mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-07 09:30:55 +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)
|
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) {
|
for (auto it = sw->cases.begin(); it != sw->cases.end(); ++it) {
|
||||||
if ((*it)->compare.size() == 0) {
|
if ((*it)->compare.size() == 0) {
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue