From 914aa8a5d3c884df0eafbef87fdeb9c3594ebd5f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 6 Nov 2016 00:03:35 +0100 Subject: Bugfix in "scc" command --- passes/cmds/scc.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'passes/cmds/scc.cc') diff --git a/passes/cmds/scc.cc b/passes/cmds/scc.cc index bb6d74474..6b8f3f512 100644 --- a/passes/cmds/scc.cc +++ b/passes/cmds/scc.cc @@ -163,16 +163,8 @@ struct SccWorker } for (auto cell : workQueue) - cellToNextCell[cell] = sigToNextCells.find(cellToNextSig[cell]); - - labelCounter = 0; - cellLabels.clear(); - - while (workQueue.size() > 0) { - RTLIL::Cell *cell = *workQueue.begin(); - log_assert(cellStack.size() == 0); - cellDepth.clear(); + cellToNextCell[cell] = sigToNextCells.find(cellToNextSig[cell]); if (!nofeedbackMode && cellToNextCell[cell].count(cell)) { log("Found an SCC:"); @@ -183,6 +175,16 @@ struct SccWorker sccList.push_back(scc); log("\n"); } + } + + labelCounter = 0; + cellLabels.clear(); + + while (!workQueue.empty()) + { + RTLIL::Cell *cell = *workQueue.begin(); + log_assert(cellStack.size() == 0); + cellDepth.clear(); run(cell, 0, maxDepth); } -- cgit v1.2.3