3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-22 02:57:51 +00:00

Improve naming: big fix

This commit is contained in:
Akash Levy 2024-11-11 17:06:11 -08:00
parent ea76abdaee
commit 894c9816d3
18 changed files with 205 additions and 155 deletions

View file

@ -227,10 +227,10 @@ bool is_blackbox(Netlist *nl)
RTLIL::IdString VerificImporter::new_verific_id(Verific::DesignObj *obj)
{
// SILIMATE: Use uniquified Verific ID as Yosys ID
// TODO: improve this
// SILIMATE: Uniquify by adding _<autoidx> suffix
std::string s = stringf("$%s", obj->Name());
while (seen_ids.count(s)) s += stringf("$%d", autoidx++);
while (seen_ids.count(s + stringf("_ix%d", autoidx))) autoidx++;
s += stringf("_ix%d", autoidx++);
seen_ids.insert(s);
return s;
}