Allow non-unique modules without state in sim writeback-mode

Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
This commit is contained in:
Claire Xenia Wolf 2022-12-21 10:43:02 +01:00
parent a9072dc23c
commit 1bc832a8e1
1 changed files with 5 additions and 4 deletions

View File

@ -685,10 +685,11 @@ struct SimInstance
void writeback(pool<Module*> &wbmods)
{
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);