Fix opt_rmdff handling of $dlatchsr
authorClifford Wolf <clifford@clifford.at>
Mon, 26 Feb 2018 10:46:05 +0000 (11:46 +0100)
committerClifford Wolf <clifford@clifford.at>
Mon, 26 Feb 2018 10:46:05 +0000 (11:46 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
passes/opt/opt_rmdff.cc

index edec42c4d5686ae14146e554de12c0d387b480a5..b5edb357bd89403be51dccb7a140df3eec1d35ee 100644 (file)
@@ -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")