Merge pull request #4218 from kivikakk/proc_rom-actionless-switch

proc_rom: don't assert on big actionless switch.
This commit is contained in:
Martin Povišer 2024-02-19 16:21:40 +01:00 committed by GitHub
commit db947e4c71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

View File

@ -66,6 +66,11 @@ struct RomWorker
}
}
if (lhs.empty()) {
log_debug("rejecting switch: lhs empty\n");
return;
}
int swsigbits = 0;
for (int i = 0; i < GetSize(sw->signal); i++)
if (sw->signal[i] != State::S0)

View File

@ -186,4 +186,27 @@ design -stash preopt
equiv_opt -assert -run prepare: dummy
design -reset
read_ilang <<EOT
module \m
wire width 3 input 1 \a
process \p
switch \a
case 3'000
case 3'001
case 3'010
case 3'011
case 3'100
case 3'101
case 3'110
case 3'111
end
end
end
EOT
proc_rom