virtual void visit(AstAlways* nodep) { // build the scoreboard scoreboardClear(); scanBlock(nodep->bodysp()); if (m_noReorderWhy != "") { // We saw a jump or something else rare that we don't handle. UINFO(9," NoSplitBlock because "<<m_noReorderWhy<<endl); return; } // Look across the entire tree of if/else blocks in the always, // and color regions that must be kept together. UINFO(5, "SplitVisitor @ "<<nodep<<endl); colorAlwaysGraph(); // Map each AstNodeIf to the set of colors (split always blocks) // it must participate in. Also find the whole set of colors. IfColorVisitor ifColor(nodep); if (ifColor.colors().size() > 1) { // Counting original always blocks rather than newly-split // always blocks makes it a little easier to use this stat to // check the result of the t_alw_split test: ++m_statSplits; // Visit through the original always block one more time, // and emit the split always blocks into m_replaceBlocks: EmitSplitVisitor emitSplit(nodep, &ifColor, &(m_replaceBlocks[nodep])); emitSplit.go(); } }
virtual void visit(AstAlways* nodep) { UINFO(4," ALW "<<nodep<<endl); if (debug()>=9) nodep->dumpTree(cout," alwIn:: "); scoreboardClear(); processBlock(nodep->bodysp()); if (debug()>=9) nodep->dumpTree(cout," alwOut: "); }
SplitReorderBaseVisitor() { scoreboardClear(); }
// CONSTUCTORS SplitVisitor(AstNetlist* nodep, bool reorder) : m_reorder(reorder) { scoreboardClear(); nodep->accept(*this); }