3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00

Another naming improvement

This commit is contained in:
Akash Levy 2024-11-12 11:54:15 -08:00
parent 9f9bacc029
commit 80169758b6

View file

@ -458,11 +458,7 @@ struct WreduceWorker
continue;
log("Removed top %d bits (of %d) from wire %s.%s.\n", unused_top_bits, GetSize(w), log_id(module), log_id(w));
// SILIMATE: Use uniquified ID with $
// TODO: improve this
IdString nw_name = IdString("$" + w->name.str());
while (module->count_id(nw_name)) nw_name = IdString("$" + nw_name.str());
Wire *nw = module->addWire(nw_name, GetSize(w) - unused_top_bits);
Wire *nw = module->addWire(module->uniquify(w->name), GetSize(w) - unused_top_bits); // SILIMATE: Improve the naming
module->connect(nw, SigSpec(w).extract(0, GetSize(nw)));
module->swap_names(w, nw);
}