Skip to content

Commit b1383a8

Browse files
committed
Make renaming nicer for bmuxmap -pmux
1 parent dbaaf78 commit b1383a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

passes/techmap/bmuxmap.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ struct BmuxmapPass : public Pass {
7474
{
7575
module->addEq(NEW_ID, sel, SigSpec(val, GetSize(sel)), new_s[val]);
7676
}
77-
RTLIL::Cell *pmux = module->addPmux(NEW_ID, new_a, data, new_s, new_data);
77+
IdString new_id = IdString("$" + cell->name.str());
78+
while (module->count_id(new_id) > 0) new_id = IdString("$" + new_id.str());
79+
RTLIL::Cell *pmux = module->addPmux(new_id, new_a, data, new_s, new_data);
7880
pmux->add_strpool_attribute(ID::src, cell->get_strpool_attribute(ID::src));
7981
data = new_data;
8082
}

0 commit comments

Comments
 (0)