From 626dbbe1e053071cf70890dd6592f461ae7eaacb Mon Sep 17 00:00:00 2001 From: George Rennie Date: Thu, 7 Nov 2024 00:06:03 +0100 Subject: [PATCH] proc_dff: fix early return bug * 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 --- passes/proc/proc_dff.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passes/proc/proc_dff.cc b/passes/proc/proc_dff.cc index 3aad9ac1c..d094abf1b 100644 --- a/passes/proc/proc_dff.cc +++ b/passes/proc/proc_dff.cc @@ -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 @@ -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,