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

Make renaming nicer for bmuxmap -pmux

This commit is contained in:
Akash Levy 2024-09-27 00:54:05 -07:00
parent dbaaf78044
commit b1383a80cf

View file

@ -74,7 +74,9 @@ struct BmuxmapPass : public Pass {
{
module->addEq(NEW_ID, sel, SigSpec(val, GetSize(sel)), new_s[val]);
}
RTLIL::Cell *pmux = module->addPmux(NEW_ID, new_a, data, new_s, new_data);
IdString new_id = IdString("$" + cell->name.str());
while (module->count_id(new_id) > 0) new_id = IdString("$" + new_id.str());
RTLIL::Cell *pmux = module->addPmux(new_id, new_a, data, new_s, new_data);
pmux->add_strpool_attribute(ID::src, cell->get_strpool_attribute(ID::src));
data = new_data;
}