3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-01 06:37:51 +00:00

flatten: redo signormalization to work around fanout issue

This commit is contained in:
Emil J. Tywoniak 2026-03-17 18:04:41 +01:00
parent bd437f207f
commit faa1a1065c
2 changed files with 10 additions and 0 deletions

View file

@ -378,6 +378,9 @@ struct RenamePass : public Pass {
break; break;
} }
// TODO disable signorm due to rename I think?
design->sigNormalize(false);
if (flag_src) if (flag_src)
{ {
extra_args(args, argidx, design); extra_args(args, argidx, design);

View file

@ -410,6 +410,8 @@ struct FlattenPass : public Pass {
} }
extra_args(args, argidx, design); extra_args(args, argidx, design);
bool was_signormed = design->flagSigNormalized;
RTLIL::Module *top = nullptr; RTLIL::Module *top = nullptr;
if (design->full_selection()) if (design->full_selection())
for (auto module : design->modules()) for (auto module : design->modules())
@ -449,6 +451,11 @@ struct FlattenPass : public Pass {
design->remove(module); design->remove(module);
} }
if (was_signormed) {
// TODO inconvenient workaround for fanout out of sync
design->sigNormalize(false);
design->sigNormalize(true);
}
log_pop(); log_pop();
} }
} FlattenPass; } FlattenPass;