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:
parent
0ab967b036
commit
fcb8695261
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue