Added $logic_not handling to fsm_detect
authorClifford Wolf <clifford@clifford.at>
Fri, 18 Sep 2015 08:46:50 +0000 (10:46 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 18 Sep 2015 08:46:50 +0000 (10:46 +0200)
passes/fsm/fsm_detect.cc

index feeaa347cfd1998e7809a84631ed880c9d78ed54..fd0ae44b96aa0cf2e4680a1f2a94911830ecba45 100644 (file)
@@ -89,6 +89,8 @@ static bool check_state_users(RTLIL::SigSpec sig)
                RTLIL::Cell *cell = cellport.first;
                if (muxtree_cells.count(cell) > 0)
                        continue;
+               if (cell->type == "$logic_not" && assign_map(cell->getPort("\\A")) == sig)
+                       continue;
                if (cellport.second != "\\A" && cellport.second != "\\B")
                        return false;
                if (!cell->hasPort("\\A") || !cell->hasPort("\\B") || !cell->hasPort("\\Y"))