From 13a5c28459ae676726611a7e08152235be1e3039 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 18 Feb 2022 09:17:36 +0100 Subject: [PATCH] simplify logic of handling flip-flops and latches --- passes/sat/sim.cc | 160 ++++++++++++---------------------------------- 1 file changed, 42 insertions(+), 118 deletions(-) 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