3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-05 10:50:25 +00:00

Fix setting bits of parameters in setundef pass

This commit also adds test that verifies correctness of this change.
This commit is contained in:
mszelwiga 2024-11-08 15:41:20 +01:00
parent cef87cc179
commit 8e508f2a2a
3 changed files with 19 additions and 1 deletions

View file

@ -243,7 +243,7 @@ struct SetundefPass : public Pass {
{
for (auto *cell : module->selected_cells()) {
for (auto &parameter : cell->parameters) {
for (auto bit : parameter.second) {
for (auto &bit : parameter.second.bits()) {
if (bit > RTLIL::State::S1)
bit = worker.next_bit();
}