3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-01-10 21:09:01 +00:00

write_verilog: Skip empty switches

This commit is contained in:
Krystine Sherwin 2026-01-07 13:09:49 +13:00
parent 0ab967b036
commit fcb8695261
No known key found for this signature in database

View file

@ -2143,6 +2143,9 @@ void dump_case_actions(std::ostream &f, std::string indent, RTLIL::CaseRule *cs)
bool dump_proc_switch_ifelse(std::ostream &f, std::string indent, RTLIL::SwitchRule *sw)
{
if (sw->cases.empty())
return true;
for (auto it = sw->cases.begin(); it != sw->cases.end(); ++it) {
if ((*it)->compare.size() == 0) {
break;