From 7ee685a0b02770f86263802a155955b8d1ebd00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Thu, 25 Jul 2024 11:35:39 +0200 Subject: [PATCH] proc_rom: Set `src` on the emitted memory --- passes/proc/proc_rom.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/passes/proc/proc_rom.cc b/passes/proc/proc_rom.cc index ebc2377aa..ae6774547 100644 --- a/passes/proc/proc_rom.cc +++ b/passes/proc/proc_rom.cc @@ -183,6 +183,12 @@ struct RomWorker mem.rd_ports.push_back(std::move(rd)); mem.emit(); + + if (sw->has_attribute(ID::src)) { + mem.inits[0].cell->attributes[ID::src] = sw->attributes[ID::src]; + mem.rd_ports[0].cell->attributes[ID::src] = sw->attributes[ID::src]; + } + for (auto cs: sw->cases) delete cs; sw->cases.clear();