From 302edf04291467469f8f48bd60edadbf1ee54798 Mon Sep 17 00:00:00 2001 From: tklam Date: Sat, 13 Oct 2018 23:11:19 +0800 Subject: [PATCH] stop check_signal_in_fanout from traversing FFs --- passes/equiv/equiv_make.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/passes/equiv/equiv_make.cc b/passes/equiv/equiv_make.cc index e74dab36f..e75482e9f 100644 --- a/passes/equiv/equiv_make.cc +++ b/passes/equiv/equiv_make.cc @@ -42,6 +42,14 @@ struct EquivMakeWorker dict> bit2driven; // map: bit <--> and its driven cells + CellTypes comb_ct; + + EquivMakeWorker() + { + comb_ct.setup_internals(); + comb_ct.setup_stdcells(); + } + void read_blacklists() { for (auto fn : blacklists) @@ -415,9 +423,12 @@ struct EquivMakeWorker auto driven_cells = bit2driven.at(source_bit); for (auto driven_cell: driven_cells) { - if (visited_cells.count(driven_cell) > 0) + bool is_comb = comb_ct.cell_known(cell->type); + if (is_comb) continue; + if (visited_cells.count(driven_cell) > 0) + continue; visited_cells.insert(driven_cell); for (auto &conn: driven_cell->connections())