From 1bc832a8e1fe9230379f3a811786bc19cac1f6dc Mon Sep 17 00:00:00 2001 From: Claire Xenia Wolf Date: Wed, 21 Dec 2022 10:43:02 +0100 Subject: [PATCH] Allow non-unique modules without state in sim writeback-mode Signed-off-by: Claire Xenia Wolf --- passes/sat/sim.cc | 9 +++++---- 1 file 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 &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);