aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorClaire Xenia Wolf <claire@clairexen.net>2022-12-21 10:43:02 +0100
committerClaire Xenia Wolf <claire@clairexen.net>2022-12-21 10:43:02 +0100
commit1bc832a8e1fe9230379f3a811786bc19cac1f6dc (patch)
tree14d6ef0d9b7e2a3928fb488dcaa0a6adb7fd79e9 /passes
parenta9072dc23c5aefa4b9f59bb486c20ea6770ed2da (diff)
downloadyosys-1bc832a8e1fe9230379f3a811786bc19cac1f6dc.tar.gz
yosys-1bc832a8e1fe9230379f3a811786bc19cac1f6dc.tar.bz2
yosys-1bc832a8e1fe9230379f3a811786bc19cac1f6dc.zip
Allow non-unique modules without state in sim writeback-mode
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
Diffstat (limited to 'passes')
-rw-r--r--passes/sat/sim.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc
index e8dda4c45..0084a1f28 100644
--- a/passes/sat/sim.cc
+++ b/passes/sat/sim.cc
@@ -685,10 +685,11 @@ struct SimInstance
void writeback(pool<Module*> &wbmods)
{
- if (wbmods.count(module))
- log_error("Instance %s of module %s is not unique: Writeback not possible. (Fix by running 'uniquify'.)\n", hiername().c_str(), log_id(module));
-
- wbmods.insert(module);
+ if (!ff_database.empty() || !mem_database.empty()) {
+ if (wbmods.count(module))
+ log_error("Instance %s of module %s is not unique: Writeback not possible. (Fix by running 'uniquify'.)\n", hiername().c_str(), log_id(module));
+ wbmods.insert(module);
+ }
for (auto wire : module->wires())
wire->attributes.erase(ID::init);