From: Miodrag Milanovic Date: Fri, 18 Feb 2022 08:17:36 +0000 (+0100) Subject: simplify logic of handling flip-flops and latches X-Git-Tag: yosys-0.15~12^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13a5c28459ae676726611a7e08152235be1e3039;p=yosys.git simplify logic of handling flip-flops and latches --- diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc index 9437542da..57df0f929 100644 --- a/passes/sat/sim.cc +++ b/passes/sat/sim.cc @@ -479,136 +479,60 @@ struct SimInstance ff_state_t &ff = it.second; FfData &ff_data = ff.data; + Const current_q = get_state(ff.data.sig_q); + if (ff_data.has_clk) { // flip-flops State current_clk = get_state(ff_data.sig_clk)[0]; - - // handle set/reset - if (ff.data.has_sr) { - Const current_q = get_state(ff.data.sig_q); - Const current_clr = get_state(ff.data.sig_clr); - Const current_set = get_state(ff.data.sig_set); - - for(int i=0;i