Skip to content

Commit

Permalink
proc_dff: fix early return bug
Browse files Browse the repository at this point in the history
* early return caused proc_dff to stop considering rules after seeing
  one async rule - this is because continue should have been used to
  continue to procecssing the next rule instead of returning from the
  function
  • Loading branch information
georgerennie committed Nov 6, 2024
1 parent 2de9f00 commit 626dbbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions passes/proc/proc_dff.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void proc_dff(RTLIL::Module *mod, RTLIL::Process *proc, ConstEval &ce)
{
log_warning("Complex async reset for dff `%s'.\n", log_signal(sig));
gen_dffsr_complex(mod, insig, sig, sync_edge->signal, sync_edge->type == RTLIL::SyncType::STp, async_rules, proc);
return;
continue;
}

// If there is a reset condition in the async rules, use it
Expand All @@ -277,7 +277,7 @@ void proc_dff(RTLIL::Module *mod, RTLIL::Process *proc, ConstEval &ce)
sync_edge->type == RTLIL::SyncType::STp,
sync_level && sync_level->type == RTLIL::SyncType::ST1,
sync_edge->signal, sync_level->signal, proc);
return;
continue;
}

gen_dff(mod, insig, rstval.as_const(), sig_q,
Expand Down

0 comments on commit 626dbbe

Please sign in to comment.