From fba499b8666ef33bc5b11ce2df7b8b18a5aeaa75 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 26 Feb 2018 11:46:05 +0100 Subject: [PATCH] Fix opt_rmdff handling of $dlatchsr Signed-off-by: Clifford Wolf --- passes/opt/opt_rmdff.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passes/opt/opt_rmdff.cc b/passes/opt/opt_rmdff.cc index edec42c4d..b5edb357b 100644 --- a/passes/opt/opt_rmdff.cc +++ b/passes/opt/opt_rmdff.cc @@ -154,6 +154,9 @@ bool handle_dffsr(RTLIL::Module *mod, RTLIL::Cell *cell) if (used_pol_set && used_pol_clr && pol_set != pol_clr) return did_something; + if (cell->type == "$dlatchsr") + return did_something; + State unified_pol = used_pol_set ? pol_set : pol_clr; if (cell->type == "$dffsr") -- 2.30.2