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

setundef: more tests! and wire selection in -init mode

This commit is contained in:
abhinavputhran 2026-03-08 19:41:31 -04:00
parent c23ba3f917
commit 47c2257f82
3 changed files with 24 additions and 7 deletions

View file

@ -364,11 +364,19 @@ struct SetundefPass : public Pass {
pool<SigBit> ffbits;
pool<Wire*> initwires;
for (auto cell : module->selected_cells())
for (auto cell : module->cells())
{
if (!cell->is_builtin_ff())
continue;
bool cell_selected = design->selected(module, cell);
bool wire_selected = false;
for (auto bit : sigmap(cell->getPort(ID::Q)))
if (bit.wire && design->selected(module, bit.wire))
wire_selected = true;
if (!cell_selected && !wire_selected)
continue;
for (auto bit : sigmap(cell->getPort(ID::Q)))
ffbits.insert(bit);
}