mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02:00
proc_rom: don't assert on big actionless switch.
See the test case. PROC_ROM will consider this for evaluation, even though -- without any actions -- lhs is empty (but still "uniform"). A zero-width memory is constructed, which later fails check with: ERROR: Assert `width != 0' failed in kernel/mem.cc:518. Ensure we don't proceed if there's nothing to encode.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user