Internals: Rename to dumpLevel(), to avoid confusion with make-a-dump()
This commit is contained in:
parent
d9b5680a45
commit
add68130b8
|
|
@ -183,7 +183,7 @@ public:
|
||||||
<< " (not all control paths of combinational always assign a value)\n"
|
<< " (not all control paths of combinational always assign a value)\n"
|
||||||
<< nodep->warnMore()
|
<< nodep->warnMore()
|
||||||
<< "... Suggest use of always_latch for intentional latches");
|
<< "... Suggest use of always_latch for intentional latches");
|
||||||
if (dumpGraph() >= 9) dumpDotFilePrefixed("latch_" + vrp->name());
|
if (dumpGraphLevel() >= 9) dumpDotFilePrefixed("latch_" + vrp->name());
|
||||||
}
|
}
|
||||||
vertp->user(false); // Clear again (see above)
|
vertp->user(false); // Clear again (see above)
|
||||||
vrp->varp()->isLatched(latch_detected);
|
vrp->varp()->isLatched(latch_detected);
|
||||||
|
|
@ -652,5 +652,5 @@ public:
|
||||||
void V3Active::activeAll(AstNetlist* nodep) {
|
void V3Active::activeAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ActiveVisitor{nodep}; } // Destruct before checking
|
{ ActiveVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("active", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("active", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -145,5 +145,5 @@ public:
|
||||||
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
|
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ActiveTopVisitor{nodep}; } // Destruct before checking
|
{ ActiveTopVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("activetop", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("activetop", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -544,5 +544,5 @@ public:
|
||||||
void V3Assert::assertAll(AstNetlist* nodep) {
|
void V3Assert::assertAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ AssertVisitor{nodep}; } // Destruct before checking
|
{ AssertVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("assert", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("assert", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -496,5 +496,5 @@ public:
|
||||||
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
|
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ AssertPreVisitor{nodep}; } // Destruct before checking
|
{ AssertPreVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1217,7 +1217,7 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump, boo
|
||||||
if (logsp->fail()) v3fatal("Can't write " << filename);
|
if (logsp->fail()) v3fatal("Can't write " << filename);
|
||||||
*logsp << "Verilator Tree Dump (format 0x3900) from <e" << std::dec << editCountLast();
|
*logsp << "Verilator Tree Dump (format 0x3900) from <e" << std::dec << editCountLast();
|
||||||
*logsp << "> to <e" << std::dec << editCountGbl() << ">\n";
|
*logsp << "> to <e" << std::dec << editCountGbl() << ">\n";
|
||||||
if (editCountGbl() == editCountLast() && ::dumpTree() < 9) {
|
if (editCountGbl() == editCountLast() && ::dumpTreeLevel() < 9) {
|
||||||
*logsp << '\n';
|
*logsp << '\n';
|
||||||
*logsp << "No changes since last dump!\n";
|
*logsp << "No changes since last dump!\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1227,7 +1227,7 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump, boo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (doDump && v3Global.opt.debugEmitV()) V3EmitV::debugEmitV(filename + ".v");
|
if (doDump && v3Global.opt.debugEmitV()) V3EmitV::debugEmitV(filename + ".v");
|
||||||
if (doCheck && (v3Global.opt.debugCheck() || ::dumpTree())) {
|
if (doCheck && (v3Global.opt.debugCheck() || ::dumpTreeLevel())) {
|
||||||
// Error check
|
// Error check
|
||||||
checkTree();
|
checkTree();
|
||||||
// Broken isn't part of check tree because it can munge iterp's
|
// Broken isn't part of check tree because it can munge iterp's
|
||||||
|
|
|
||||||
|
|
@ -408,5 +408,5 @@ void V3Begin::debeginAll(AstNetlist* nodep) {
|
||||||
{ BeginVisitor{nodep, &state}; }
|
{ BeginVisitor{nodep, &state}; }
|
||||||
if (state.anyFuncInBegin()) { BeginRelinkVisitor{nodep, &state}; }
|
if (state.anyFuncInBegin()) { BeginRelinkVisitor{nodep, &state}; }
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("begin", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("begin", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -257,5 +257,5 @@ void V3CCtors::cctorsAll() {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
evalAsserts();
|
evalAsserts();
|
||||||
{ CCtorsVisitor{v3Global.rootp()}; }
|
{ CCtorsVisitor{v3Global.rootp()}; }
|
||||||
V3Global::dumpCheckGlobalTree("cctors", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("cctors", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,5 +115,5 @@ void V3CUse::cUseAll() {
|
||||||
// for each output file and put under that
|
// for each output file and put under that
|
||||||
CUseVisitor{modp};
|
CUseVisitor{modp};
|
||||||
}
|
}
|
||||||
V3Global::dumpCheckGlobalTree("cuse", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("cuse", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,7 @@ public:
|
||||||
void V3Case::caseAll(AstNetlist* nodep) {
|
void V3Case::caseAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ CaseVisitor{nodep}; } // Destruct before checking
|
{ CaseVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("case", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("case", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
void V3Case::caseLint(AstNodeCase* nodep) {
|
void V3Case::caseLint(AstNodeCase* nodep) {
|
||||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||||
|
|
|
||||||
|
|
@ -208,5 +208,5 @@ public:
|
||||||
void V3Cast::castAll(AstNetlist* nodep) {
|
void V3Cast::castAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ CastVisitor{nodep}; } // Destruct before checking
|
{ CastVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("cast", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("cast", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -244,5 +244,5 @@ public:
|
||||||
void V3Class::classAll(AstNetlist* nodep) {
|
void V3Class::classAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ClassVisitor{nodep}; } // Destruct before checking
|
{ ClassVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("class", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("class", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -325,5 +325,5 @@ public:
|
||||||
void V3Clean::cleanAll(AstNetlist* nodep) {
|
void V3Clean::cleanAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ CleanVisitor{nodep}; } // Destruct before checking
|
{ CleanVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("clean", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("clean", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,5 +224,5 @@ public:
|
||||||
void V3Clock::clockAll(AstNetlist* nodep) {
|
void V3Clock::clockAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ClockVisitor{nodep}; } // Destruct before checking
|
{ ClockVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("clock", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("clock", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -238,5 +238,5 @@ public:
|
||||||
void V3Combine::combineAll(AstNetlist* nodep) {
|
void V3Combine::combineAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
CombineVisitor::apply(nodep);
|
CombineVisitor::apply(nodep);
|
||||||
V3Global::dumpCheckGlobalTree("combine", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("combine", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,5 +172,5 @@ void V3Common::commonAll() {
|
||||||
if (!dtypep->packed()) makeVlToString(dtypep);
|
if (!dtypep->packed()) makeVlToString(dtypep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
V3Global::dumpCheckGlobalTree("common", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("common", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3759,7 +3759,7 @@ void V3Const::constifyAllLint(AstNetlist* nodep) {
|
||||||
ConstVisitor visitor{ConstVisitor::PROC_V_WARN, /* globalPass: */ true};
|
ConstVisitor visitor{ConstVisitor::PROC_V_WARN, /* globalPass: */ true};
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Const::constifyCpp(AstNetlist* nodep) {
|
void V3Const::constifyCpp(AstNetlist* nodep) {
|
||||||
|
|
@ -3768,7 +3768,7 @@ void V3Const::constifyCpp(AstNetlist* nodep) {
|
||||||
ConstVisitor visitor{ConstVisitor::PROC_CPP, /* globalPass: */ true};
|
ConstVisitor visitor{ConstVisitor::PROC_CPP, /* globalPass: */ true};
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("const_cpp", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("const_cpp", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* V3Const::constifyEdit(AstNode* nodep) {
|
AstNode* V3Const::constifyEdit(AstNode* nodep) {
|
||||||
|
|
@ -3792,7 +3792,7 @@ void V3Const::constifyAllLive(AstNetlist* nodep) {
|
||||||
ConstVisitor visitor{ConstVisitor::PROC_LIVE, /* globalPass: */ true};
|
ConstVisitor visitor{ConstVisitor::PROC_LIVE, /* globalPass: */ true};
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Const::constifyAll(AstNetlist* nodep) {
|
void V3Const::constifyAll(AstNetlist* nodep) {
|
||||||
|
|
@ -3802,7 +3802,7 @@ void V3Const::constifyAll(AstNetlist* nodep) {
|
||||||
ConstVisitor visitor{ConstVisitor::PROC_V_EXPENSIVE, /* globalPass: */ true};
|
ConstVisitor visitor{ConstVisitor::PROC_V_EXPENSIVE, /* globalPass: */ true};
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* V3Const::constifyExpensiveEdit(AstNode* nodep) {
|
AstNode* V3Const::constifyExpensiveEdit(AstNode* nodep) {
|
||||||
|
|
|
||||||
|
|
@ -567,5 +567,5 @@ public:
|
||||||
void V3Coverage::coverage(AstNetlist* rootp) {
|
void V3Coverage::coverage(AstNetlist* rootp) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ CoverageVisitor{rootp}; } // Destruct before checking
|
{ CoverageVisitor{rootp}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("coverage", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("coverage", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,5 +117,5 @@ public:
|
||||||
void V3CoverageJoin::coverageJoin(AstNetlist* rootp) {
|
void V3CoverageJoin::coverageJoin(AstNetlist* rootp) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ CoverageJoinVisitor{rootp}; } // Destruct before checking
|
{ CoverageJoinVisitor{rootp}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -539,29 +539,29 @@ void V3Dead::deadifyModules(AstNetlist* nodep) {
|
||||||
{
|
{
|
||||||
DeadVisitor{nodep, false, false, false, false, !v3Global.opt.topIfacesSupported()};
|
DeadVisitor{nodep, false, false, false, false, !v3Global.opt.topIfacesSupported()};
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("deadModules", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("deadModules", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
|
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DeadVisitor{nodep, false, true, false, false, false}; } // Destruct before checking
|
{ DeadVisitor{nodep, false, true, false, false, false}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Dead::deadifyDTypesScoped(AstNetlist* nodep) {
|
void V3Dead::deadifyDTypesScoped(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DeadVisitor{nodep, false, true, true, false, false}; } // Destruct before checking
|
{ DeadVisitor{nodep, false, true, true, false, false}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Dead::deadifyAll(AstNetlist* nodep) {
|
void V3Dead::deadifyAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DeadVisitor{nodep, true, true, false, true, false}; } // Destruct before checking
|
{ DeadVisitor{nodep, true, true, false, true, false}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Dead::deadifyAllScoped(AstNetlist* nodep) {
|
void V3Dead::deadifyAllScoped(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DeadVisitor{nodep, true, true, true, true, false}; } // Destruct before checking
|
{ DeadVisitor{nodep, true, true, true, true, false}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -641,5 +641,5 @@ public:
|
||||||
void V3Delayed::delayedAll(AstNetlist* nodep) {
|
void V3Delayed::delayedAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DelayedVisitor{nodep}; } // Destruct before checking
|
{ DelayedVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("delayed", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("delayed", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,5 +166,5 @@ public:
|
||||||
void V3Depth::depthAll(AstNetlist* nodep) {
|
void V3Depth::depthAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DepthVisitor{nodep}; } // Destruct before checking
|
{ DepthVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("depth", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("depth", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,5 +127,5 @@ public:
|
||||||
void V3DepthBlock::depthBlockAll(AstNetlist* nodep) {
|
void V3DepthBlock::depthBlockAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DepthBlockVisitor{nodep}; } // Destruct before checking
|
{ DepthBlockVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -285,5 +285,5 @@ public:
|
||||||
void V3Descope::descopeAll(AstNetlist* nodep) {
|
void V3Descope::descopeAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ DescopeVisitor{nodep}; } // Destruct before checking
|
{ DescopeVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("descope", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("descope", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ void V3DfgOptimizer::extract(AstNetlist* netlistp) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
// Extract more optimization candidates
|
// Extract more optimization candidates
|
||||||
DataflowExtractVisitor::apply(netlistp);
|
DataflowExtractVisitor::apply(netlistp);
|
||||||
V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||||
|
|
@ -267,7 +267,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||||
|
|
||||||
// Build the DFG of this module
|
// Build the DFG of this module
|
||||||
const std::unique_ptr<DfgGraph> dfg{V3DfgPasses::astToDfg(*modp, ctx)};
|
const std::unique_ptr<DfgGraph> dfg{V3DfgPasses::astToDfg(*modp, ctx)};
|
||||||
if (dumpDfg() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-input");
|
if (dumpDfgLevel() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-input");
|
||||||
|
|
||||||
// Extract the cyclic sub-graphs. We do this because a lot of the optimizations assume a
|
// Extract the cyclic sub-graphs. We do this because a lot of the optimizations assume a
|
||||||
// DAG, and large, mostly acyclic graphs could not be optimized due to the presence of
|
// DAG, and large, mostly acyclic graphs could not be optimized due to the presence of
|
||||||
|
|
@ -284,7 +284,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||||
|
|
||||||
// For each cyclic component
|
// For each cyclic component
|
||||||
for (auto& component : cyclicComponents) {
|
for (auto& component : cyclicComponents) {
|
||||||
if (dumpDfg() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source");
|
if (dumpDfgLevel() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source");
|
||||||
// TODO: Apply optimizations safe for cyclic graphs
|
// TODO: Apply optimizations safe for cyclic graphs
|
||||||
// Add back under the main DFG (we will convert everything back in one go)
|
// Add back under the main DFG (we will convert everything back in one go)
|
||||||
dfg->addGraph(*component);
|
dfg->addGraph(*component);
|
||||||
|
|
@ -292,7 +292,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||||
|
|
||||||
// For each acyclic component
|
// For each acyclic component
|
||||||
for (auto& component : acyclicComponents) {
|
for (auto& component : acyclicComponents) {
|
||||||
if (dumpDfg() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source");
|
if (dumpDfgLevel() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source");
|
||||||
// Optimize the component
|
// Optimize the component
|
||||||
V3DfgPasses::optimize(*component, ctx);
|
V3DfgPasses::optimize(*component, ctx);
|
||||||
// Add back under the main DFG (we will convert everything back in one go)
|
// Add back under the main DFG (we will convert everything back in one go)
|
||||||
|
|
@ -300,9 +300,9 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert back to Ast
|
// Convert back to Ast
|
||||||
if (dumpDfg() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-optimized");
|
if (dumpDfgLevel() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-optimized");
|
||||||
AstModule* const resultModp = V3DfgPasses::dfgToAst(*dfg, ctx);
|
AstModule* const resultModp = V3DfgPasses::dfgToAst(*dfg, ctx);
|
||||||
UASSERT_OBJ(resultModp == modp, modp, "Should be the same module");
|
UASSERT_OBJ(resultModp == modp, modp, "Should be the same module");
|
||||||
}
|
}
|
||||||
V3Global::dumpCheckGlobalTree("dfg-optimize", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("dfg-optimize", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) {
|
||||||
|
|
||||||
const auto apply = [&](int dumpLevel, const string& name, std::function<void()> pass) {
|
const auto apply = [&](int dumpLevel, const string& name, std::function<void()> pass) {
|
||||||
pass();
|
pass();
|
||||||
if (dumpDfg() >= dumpLevel) {
|
if (dumpDfgLevel() >= dumpLevel) {
|
||||||
const string strippedName = VString::removeWhitespace(name);
|
const string strippedName = VString::removeWhitespace(name);
|
||||||
const string label
|
const string label
|
||||||
= ctx.prefix() + "pass-" + cvtToStr(passNumber) + "-" + strippedName;
|
= ctx.prefix() + "pass-" + cvtToStr(passNumber) + "-" + strippedName;
|
||||||
|
|
@ -294,7 +294,7 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) {
|
||||||
++passNumber;
|
++passNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (dumpDfg() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "input");
|
if (dumpDfgLevel() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "input");
|
||||||
apply(3, "input ", [&]() {});
|
apply(3, "input ", [&]() {});
|
||||||
apply(4, "inlineVars ", [&]() { inlineVars(dfg); });
|
apply(4, "inlineVars ", [&]() { inlineVars(dfg); });
|
||||||
apply(4, "cse0 ", [&]() { cse(dfg, ctx.m_cseContext0); });
|
apply(4, "cse0 ", [&]() { cse(dfg, ctx.m_cseContext0); });
|
||||||
|
|
@ -304,5 +304,5 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) {
|
||||||
apply(4, "cse1 ", [&]() { cse(dfg, ctx.m_cseContext1); });
|
apply(4, "cse1 ", [&]() { cse(dfg, ctx.m_cseContext1); });
|
||||||
}
|
}
|
||||||
apply(4, "removeVars ", [&]() { removeVars(dfg, ctx.m_removeVarsContext); });
|
apply(4, "removeVars ", [&]() { removeVars(dfg, ctx.m_removeVarsContext); });
|
||||||
if (dumpDfg() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "optimized");
|
if (dumpDfgLevel() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "optimized");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,5 +100,5 @@ void V3DupFinder::dumpFile(const string& filename, bool tree) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3DupFinder::dumpFilePrefixed(const string& nameComment, bool tree) {
|
void V3DupFinder::dumpFilePrefixed(const string& nameComment, bool tree) {
|
||||||
if (dump()) dumpFile(v3Global.debugFilename(nameComment) + ".hash", tree);
|
if (dumpLevel()) dumpFile(v3Global.debugFilename(nameComment) + ".hash", tree);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,10 +220,10 @@ void V3ErrorGuarded::v3errorEnd(std::ostringstream& sstr, const string& extra)
|
||||||
tellManual(2);
|
tellManual(2);
|
||||||
}
|
}
|
||||||
#ifndef V3ERROR_NO_GLOBAL_
|
#ifndef V3ERROR_NO_GLOBAL_
|
||||||
if (dumpTree() || debug()) {
|
if (dumpTreeLevel() || debug()) {
|
||||||
V3Broken::allowMidvisitorCheck(true);
|
V3Broken::allowMidvisitorCheck(true);
|
||||||
V3ThreadPool::s().requestExclusiveAccess([&]() VL_REQUIRES(m_mutex) {
|
V3ThreadPool::s().requestExclusiveAccess([&]() VL_REQUIRES(m_mutex) {
|
||||||
if (dumpTree()) {
|
if (dumpTreeLevel()) {
|
||||||
v3Global.rootp()->dumpTreeFile(
|
v3Global.rootp()->dumpTreeFile(
|
||||||
v3Global.debugFilename("final.tree", 990));
|
v3Global.debugFilename("final.tree", 990));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -666,12 +666,10 @@ inline void v3errorEndFatal(std::ostringstream& sstr)
|
||||||
static_assert(true, "")
|
static_assert(true, "")
|
||||||
|
|
||||||
// Takes an optional "name" (as __VA_ARGS__)
|
// Takes an optional "name" (as __VA_ARGS__)
|
||||||
#define VL_DEFINE_DUMP(...) \
|
#define VL_DEFINE_DUMP(func, tag) \
|
||||||
VL_ATTR_UNUSED static int dump##__VA_ARGS__() { \
|
VL_ATTR_UNUSED static int dump##func() { \
|
||||||
static int level = -1; \
|
static int level = -1; \
|
||||||
if (VL_UNLIKELY(level < 0)) { \
|
if (VL_UNLIKELY(level < 0)) { \
|
||||||
std::string tag{VL_STRINGIFY(__VA_ARGS__)}; \
|
|
||||||
tag[0] = std::tolower(tag[0]); \
|
|
||||||
const unsigned dumpTag = v3Global.opt.dumpLevel(tag); \
|
const unsigned dumpTag = v3Global.opt.dumpLevel(tag); \
|
||||||
const unsigned dumpSrc = v3Global.opt.dumpSrcLevel(__FILE__); \
|
const unsigned dumpSrc = v3Global.opt.dumpSrcLevel(__FILE__); \
|
||||||
const unsigned dumpLevel = dumpTag >= dumpSrc ? dumpTag : dumpSrc; \
|
const unsigned dumpLevel = dumpTag >= dumpSrc ? dumpTag : dumpSrc; \
|
||||||
|
|
@ -685,11 +683,11 @@ inline void v3errorEndFatal(std::ostringstream& sstr)
|
||||||
// Define debug*() and dump*() routines. This needs to be added to every compilation unit so that
|
// Define debug*() and dump*() routines. This needs to be added to every compilation unit so that
|
||||||
// --debugi-<tag/srcfile> and --dumpi-<tag/srcfile> can be used to control debug prints and dumping
|
// --debugi-<tag/srcfile> and --dumpi-<tag/srcfile> can be used to control debug prints and dumping
|
||||||
#define VL_DEFINE_DEBUG_FUNCTIONS \
|
#define VL_DEFINE_DEBUG_FUNCTIONS \
|
||||||
VL_DEFINE_DEBUG(); /* Define 'int debug()' */ \
|
VL_DEFINE_DEBUG(); /* Define 'int debug()' for --debugi */ \
|
||||||
VL_DEFINE_DUMP(); /* Define 'int dump()' */ \
|
VL_DEFINE_DUMP(Level, ""); /* Define 'int dumpLevel()' for --dumpi */ \
|
||||||
VL_DEFINE_DUMP(Dfg); /* Define 'int dumpDfg()' */ \
|
VL_DEFINE_DUMP(DfgLevel, "dfg"); /* Define 'int dumpDfgLevel()' for --dumpi-level */ \
|
||||||
VL_DEFINE_DUMP(Graph); /* Define 'int dumpGraph()' */ \
|
VL_DEFINE_DUMP(GraphLevel, "graph"); /* Define 'int dumpGraphLevel()' for dumpi-graph */ \
|
||||||
VL_DEFINE_DUMP(Tree); /* Define 'int dumpTree()' */ \
|
VL_DEFINE_DUMP(TreeLevel, "tree"); /* Define 'int dumpTreeLevel()' for dumpi-tree */ \
|
||||||
static_assert(true, "")
|
static_assert(true, "")
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -915,5 +915,5 @@ public:
|
||||||
void V3Expand::expandAll(AstNetlist* nodep) {
|
void V3Expand::expandAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ExpandVisitor{nodep}; } // Destruct before checking
|
{ ExpandVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("expand", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("expand", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -314,5 +314,5 @@ void V3Force::forceAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
if (!v3Global.hasForceableSignals()) return;
|
if (!v3Global.hasForceableSignals()) return;
|
||||||
ForceConvertVisitor::apply(nodep);
|
ForceConvertVisitor::apply(nodep);
|
||||||
V3Global::dumpCheckGlobalTree("force", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("force", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -421,12 +421,12 @@ private:
|
||||||
// VISITORS
|
// VISITORS
|
||||||
void visit(AstNetlist* nodep) override {
|
void visit(AstNetlist* nodep) override {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
if (dumpGraph() >= 3) m_graph.dumpDotFilePrefixed("gate_pre");
|
if (dumpGraphLevel() >= 3) m_graph.dumpDotFilePrefixed("gate_pre");
|
||||||
warnSignals(); // Before loss of sync/async pointers
|
warnSignals(); // Before loss of sync/async pointers
|
||||||
// Decompose clock vectors -- need to do this before removing redundant edges
|
// Decompose clock vectors -- need to do this before removing redundant edges
|
||||||
decomposeClkVectors();
|
decomposeClkVectors();
|
||||||
m_graph.removeRedundantEdgesSum(&V3GraphEdge::followAlwaysTrue);
|
m_graph.removeRedundantEdgesSum(&V3GraphEdge::followAlwaysTrue);
|
||||||
if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("gate_simp");
|
if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("gate_simp");
|
||||||
// Find gate interconnect and optimize
|
// Find gate interconnect and optimize
|
||||||
m_graph.userClearVertices(); // vertex->user(): bool. Indicates we've set it as consumed
|
m_graph.userClearVertices(); // vertex->user(): bool. Indicates we've set it as consumed
|
||||||
// Get rid of buffers first,
|
// Get rid of buffers first,
|
||||||
|
|
@ -438,15 +438,15 @@ private:
|
||||||
// Remove redundant logic
|
// Remove redundant logic
|
||||||
if (v3Global.opt.fDedupe()) {
|
if (v3Global.opt.fDedupe()) {
|
||||||
dedupe();
|
dedupe();
|
||||||
if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("gate_dedup");
|
if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("gate_dedup");
|
||||||
}
|
}
|
||||||
if (v3Global.opt.fAssemble()) {
|
if (v3Global.opt.fAssemble()) {
|
||||||
mergeAssigns();
|
mergeAssigns();
|
||||||
if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("gate_assm");
|
if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("gate_assm");
|
||||||
}
|
}
|
||||||
// Consumption warnings
|
// Consumption warnings
|
||||||
consumedMark();
|
consumedMark();
|
||||||
if (dumpGraph() >= 3) m_graph.dumpDotFilePrefixed("gate_opt");
|
if (dumpGraphLevel() >= 3) m_graph.dumpDotFilePrefixed("gate_opt");
|
||||||
// Rewrite assignments
|
// Rewrite assignments
|
||||||
consumedMove();
|
consumedMove();
|
||||||
}
|
}
|
||||||
|
|
@ -1488,5 +1488,5 @@ void GateVisitor::decomposeClkVectors() {
|
||||||
void V3Gate::gateAll(AstNetlist* nodep) {
|
void V3Gate::gateAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ const GateVisitor visitor{nodep}; } // Destruct before checking
|
{ const GateVisitor visitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("gate", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("gate", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -544,28 +544,28 @@ void GraphAcyc::main() {
|
||||||
// edges (and thus can't represent loops - if we did the unbreakable
|
// edges (and thus can't represent loops - if we did the unbreakable
|
||||||
// marking right, anyways)
|
// marking right, anyways)
|
||||||
buildGraph(m_origGraphp);
|
buildGraph(m_origGraphp);
|
||||||
if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_pre");
|
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_pre");
|
||||||
|
|
||||||
// Perform simple optimizations before any cuttings
|
// Perform simple optimizations before any cuttings
|
||||||
simplify(false);
|
simplify(false);
|
||||||
if (dumpGraph() >= 5) m_breakGraph.dumpDotFilePrefixed("acyc_simp");
|
if (dumpGraphLevel() >= 5) m_breakGraph.dumpDotFilePrefixed("acyc_simp");
|
||||||
|
|
||||||
UINFO(4, " Cutting trivial loops\n");
|
UINFO(4, " Cutting trivial loops\n");
|
||||||
simplify(true);
|
simplify(true);
|
||||||
if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_mid");
|
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_mid");
|
||||||
|
|
||||||
UINFO(4, " Ranking\n");
|
UINFO(4, " Ranking\n");
|
||||||
m_breakGraph.rank(&V3GraphEdge::followNotCutable);
|
m_breakGraph.rank(&V3GraphEdge::followNotCutable);
|
||||||
if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_rank");
|
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_rank");
|
||||||
|
|
||||||
UINFO(4, " Placement\n");
|
UINFO(4, " Placement\n");
|
||||||
place();
|
place();
|
||||||
if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_place");
|
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_place");
|
||||||
|
|
||||||
UINFO(4, " Final Ranking\n");
|
UINFO(4, " Final Ranking\n");
|
||||||
// Only needed to assert there are no loops in completed graph
|
// Only needed to assert there are no loops in completed graph
|
||||||
m_breakGraph.rank(&V3GraphEdge::followAlwaysTrue);
|
m_breakGraph.rank(&V3GraphEdge::followAlwaysTrue);
|
||||||
if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_done");
|
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_done");
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Graph::acyclic(V3EdgeFuncP edgeFuncp) {
|
void V3Graph::acyclic(V3EdgeFuncP edgeFuncp) {
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ protected:
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
void dumpSelf() {
|
void dumpSelf() {
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("v3graphtest_" + name());
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("v3graphtest_" + name());
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -727,5 +727,5 @@ void V3Inline::inlineAll(AstNetlist* nodep) {
|
||||||
}
|
}
|
||||||
|
|
||||||
{ InlineIntfRefVisitor{nodep}; }
|
{ InlineIntfRefVisitor{nodep}; }
|
||||||
V3Global::dumpCheckGlobalTree("inline", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("inline", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -616,11 +616,11 @@ void V3Inst::checkOutputShort(AstPin* nodep) {
|
||||||
void V3Inst::instAll(AstNetlist* nodep) {
|
void V3Inst::instAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ InstVisitor{nodep}; } // Destruct before checking
|
{ InstVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("inst", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("inst", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Inst::dearrayAll(AstNetlist* nodep) {
|
void V3Inst::dearrayAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ InstDeVisitor{nodep}; } // Destruct before checking
|
{ InstDeVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("dearray", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("dearray", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -515,5 +515,5 @@ void V3Life::lifeAll(AstNetlist* nodep) {
|
||||||
LifeState state;
|
LifeState state;
|
||||||
LifeTopVisitor{nodep, &state};
|
LifeTopVisitor{nodep, &state};
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("life", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("life", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -369,5 +369,5 @@ void V3LifePost::lifepostAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
// Mark redundant AssignPost
|
// Mark redundant AssignPost
|
||||||
{ LifePostDlyVisitor{nodep}; } // Destruct before checking
|
{ LifePostDlyVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("life_post", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("life_post", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ private:
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
// Find levels in graph
|
// Find levels in graph
|
||||||
m_graph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue);
|
m_graph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue);
|
||||||
if (dumpGraph()) m_graph.dumpDotFilePrefixed("linkcells");
|
if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed("linkcells");
|
||||||
m_graph.rank();
|
m_graph.rank();
|
||||||
for (V3GraphVertex* itp = m_graph.verticesBeginp(); itp; itp = itp->verticesNextp()) {
|
for (V3GraphVertex* itp = m_graph.verticesBeginp(); itp; itp = itp->verticesNextp()) {
|
||||||
if (const LinkCellsVertex* const vvertexp = dynamic_cast<LinkCellsVertex*>(itp)) {
|
if (const LinkCellsVertex* const vvertexp = dynamic_cast<LinkCellsVertex*>(itp)) {
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ public:
|
||||||
// METHODS
|
// METHODS
|
||||||
|
|
||||||
void dumpSelf(const string& nameComment = "linkdot", bool force = false) {
|
void dumpSelf(const string& nameComment = "linkdot", bool force = false) {
|
||||||
if (dump() >= 6 || force) {
|
if (dumpLevel() >= 6 || force) {
|
||||||
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
||||||
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
||||||
if (logp->fail()) v3fatal("Can't write " << filename);
|
if (logp->fail()) v3fatal("Can't write " << filename);
|
||||||
|
|
@ -193,7 +193,7 @@ public:
|
||||||
}
|
}
|
||||||
void preErrorDump() {
|
void preErrorDump() {
|
||||||
static bool diddump = false;
|
static bool diddump = false;
|
||||||
if (!diddump && dumpTree()) {
|
if (!diddump && dumpTreeLevel()) {
|
||||||
diddump = true;
|
diddump = true;
|
||||||
dumpSelf("linkdot-preerr", true);
|
dumpSelf("linkdot-preerr", true);
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("linkdot-preerr.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("linkdot-preerr.tree"));
|
||||||
|
|
@ -3555,18 +3555,18 @@ public:
|
||||||
// Link class functions
|
// Link class functions
|
||||||
|
|
||||||
void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
||||||
if (debug() >= 5 || dumpTree() >= 9) {
|
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot.tree"));
|
||||||
}
|
}
|
||||||
LinkDotState state(rootp, step);
|
LinkDotState state(rootp, step);
|
||||||
const LinkDotFindVisitor visitor{rootp, &state};
|
const LinkDotFindVisitor visitor{rootp, &state};
|
||||||
if (debug() >= 5 || dumpTree() >= 9) {
|
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-find.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-find.tree"));
|
||||||
}
|
}
|
||||||
if (step == LDS_PRIMARY || step == LDS_PARAMED) {
|
if (step == LDS_PRIMARY || step == LDS_PARAMED) {
|
||||||
// Initial link stage, resolve parameters
|
// Initial link stage, resolve parameters
|
||||||
const LinkDotParamVisitor visitors{rootp, &state};
|
const LinkDotParamVisitor visitors{rootp, &state};
|
||||||
if (debug() >= 5 || dumpTree() >= 9) {
|
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-param.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-param.tree"));
|
||||||
}
|
}
|
||||||
} else if (step == LDS_ARRAYED) {
|
} else if (step == LDS_ARRAYED) {
|
||||||
|
|
@ -3575,7 +3575,7 @@ void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
||||||
// process AstScope's. This needs to be separate pass after whole hierarchy graph created.
|
// process AstScope's. This needs to be separate pass after whole hierarchy graph created.
|
||||||
const LinkDotScopeVisitor visitors{rootp, &state};
|
const LinkDotScopeVisitor visitors{rootp, &state};
|
||||||
v3Global.assertScoped(true);
|
v3Global.assertScoped(true);
|
||||||
if (debug() >= 5 || dumpTree() >= 9) {
|
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-scoped.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-scoped.tree"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3592,23 +3592,23 @@ void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
||||||
void V3LinkDot::linkDotPrimary(AstNetlist* nodep) {
|
void V3LinkDot::linkDotPrimary(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
linkDotGuts(nodep, LDS_PRIMARY);
|
linkDotGuts(nodep, LDS_PRIMARY);
|
||||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3LinkDot::linkDotParamed(AstNetlist* nodep) {
|
void V3LinkDot::linkDotParamed(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
linkDotGuts(nodep, LDS_PARAMED);
|
linkDotGuts(nodep, LDS_PARAMED);
|
||||||
V3Global::dumpCheckGlobalTree("linkdotparam", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("linkdotparam", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3LinkDot::linkDotArrayed(AstNetlist* nodep) {
|
void V3LinkDot::linkDotArrayed(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
linkDotGuts(nodep, LDS_ARRAYED);
|
linkDotGuts(nodep, LDS_ARRAYED);
|
||||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3LinkDot::linkDotScope(AstNetlist* nodep) {
|
void V3LinkDot::linkDotScope(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
linkDotGuts(nodep, LDS_SCOPED);
|
linkDotGuts(nodep, LDS_SCOPED);
|
||||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -310,5 +310,5 @@ public:
|
||||||
void V3LinkInc::linkIncrements(AstNetlist* nodep) {
|
void V3LinkInc::linkIncrements(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ LinkIncVisitor{nodep}; } // Destruct before checking
|
{ LinkIncVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -351,5 +351,5 @@ public:
|
||||||
void V3LinkJump::linkJump(AstNetlist* nodep) {
|
void V3LinkJump::linkJump(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ LinkJumpVisitor{nodep}; } // Destruct before checking
|
{ LinkJumpVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ public:
|
||||||
void V3LinkLValue::linkLValue(AstNetlist* nodep) {
|
void V3LinkLValue::linkLValue(AstNetlist* nodep) {
|
||||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||||
{ LinkLValueVisitor{nodep, VAccess::NOCHANGE}; } // Destruct before checking
|
{ LinkLValueVisitor{nodep, VAccess::NOCHANGE}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
void V3LinkLValue::linkLValueSet(AstNode* nodep) {
|
void V3LinkLValue::linkLValueSet(AstNode* nodep) {
|
||||||
// Called by later link functions when it is known a node needs
|
// Called by later link functions when it is known a node needs
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ void V3LinkLevel::modSortByLevel() {
|
||||||
UASSERT_OBJ(!v3Global.rootp()->modulesp(), v3Global.rootp(), "Unlink didn't work");
|
UASSERT_OBJ(!v3Global.rootp()->modulesp(), v3Global.rootp(), "Unlink didn't work");
|
||||||
for (AstNodeModule* nodep : mods) v3Global.rootp()->addModulesp(nodep);
|
for (AstNodeModule* nodep : mods) v3Global.rootp()->addModulesp(nodep);
|
||||||
UINFO(9, "modSortByLevel() done\n"); // Comment required for gcc4.6.3 / bug666
|
UINFO(9, "modSortByLevel() done\n"); // Comment required for gcc4.6.3 / bug666
|
||||||
V3Global::dumpCheckGlobalTree("cells", false, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("cells", false, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3LinkLevel::timescaling(const ModVec& mods) {
|
void V3LinkLevel::timescaling(const ModVec& mods) {
|
||||||
|
|
@ -184,7 +184,7 @@ void V3LinkLevel::wrapTop(AstNetlist* rootp) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
V3Global::dumpCheckGlobalTree("wraptop", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("wraptop", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
||||||
|
|
|
||||||
|
|
@ -775,5 +775,5 @@ public:
|
||||||
void V3LinkParse::linkParse(AstNetlist* rootp) {
|
void V3LinkParse::linkParse(AstNetlist* rootp) {
|
||||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||||
{ LinkParseVisitor{rootp}; } // Destruct before checking
|
{ LinkParseVisitor{rootp}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -484,5 +484,5 @@ void V3LinkResolve::linkResolve(AstNetlist* rootp) {
|
||||||
const LinkResolveVisitor visitor{rootp};
|
const LinkResolveVisitor visitor{rootp};
|
||||||
LinkBotupVisitor{rootp};
|
LinkBotupVisitor{rootp};
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("linkresolve", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("linkresolve", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -223,5 +223,5 @@ public:
|
||||||
void V3Localize::localizeAll(AstNetlist* nodep) {
|
void V3Localize::localizeAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ LocalizeVisitor{nodep}; } // Destruct before checking
|
{ LocalizeVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("localize", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("localize", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -888,5 +888,5 @@ public:
|
||||||
void V3MergeCond::mergeAll(AstNetlist* nodep) {
|
void V3MergeCond::mergeAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ MergeCondVisitor{nodep}; }
|
{ MergeCondVisitor{nodep}; }
|
||||||
V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,5 +150,5 @@ public:
|
||||||
void V3Name::nameAll(AstNetlist* nodep) {
|
void V3Name::nameAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ NameVisitor{nodep}; } // Destruct before checking
|
{ NameVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("name", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("name", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1416,7 +1416,7 @@ void OrderProcess::processMTasks() {
|
||||||
|
|
||||||
void OrderProcess::process(bool multiThreaded) {
|
void OrderProcess::process(bool multiThreaded) {
|
||||||
// Dump data
|
// Dump data
|
||||||
if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_pre");
|
if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_pre");
|
||||||
|
|
||||||
// Break cycles. Each strongly connected subgraph (including cutable
|
// Break cycles. Each strongly connected subgraph (including cutable
|
||||||
// edges) will have its own color, and corresponds to a loop in the
|
// edges) will have its own color, and corresponds to a loop in the
|
||||||
|
|
@ -1424,27 +1424,27 @@ void OrderProcess::process(bool multiThreaded) {
|
||||||
// edges are actually still there, just with weight 0).
|
// edges are actually still there, just with weight 0).
|
||||||
UINFO(2, " Acyclic & Order...\n");
|
UINFO(2, " Acyclic & Order...\n");
|
||||||
m_graph.acyclic(&V3GraphEdge::followAlwaysTrue);
|
m_graph.acyclic(&V3GraphEdge::followAlwaysTrue);
|
||||||
if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_acyc");
|
if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_acyc");
|
||||||
|
|
||||||
// Assign ranks so we know what to follow
|
// Assign ranks so we know what to follow
|
||||||
// Then, sort vertices and edges by that ordering
|
// Then, sort vertices and edges by that ordering
|
||||||
m_graph.order();
|
m_graph.order();
|
||||||
if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_order");
|
if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_order");
|
||||||
|
|
||||||
// Assign logic vertices to new domains
|
// Assign logic vertices to new domains
|
||||||
UINFO(2, " Domains...\n");
|
UINFO(2, " Domains...\n");
|
||||||
processDomains();
|
processDomains();
|
||||||
if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_domain");
|
if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_domain");
|
||||||
|
|
||||||
if (dump()) processEdgeReport();
|
if (dumpLevel()) processEdgeReport();
|
||||||
|
|
||||||
if (!multiThreaded) {
|
if (!multiThreaded) {
|
||||||
UINFO(2, " Construct Move Graph...\n");
|
UINFO(2, " Construct Move Graph...\n");
|
||||||
processMoveBuildGraph();
|
processMoveBuildGraph();
|
||||||
// Different prefix (ordermv) as it's not the same graph
|
// Different prefix (ordermv) as it's not the same graph
|
||||||
if (dumpGraph() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_start");
|
if (dumpGraphLevel() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_start");
|
||||||
m_pomGraph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue);
|
m_pomGraph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue);
|
||||||
if (dumpGraph() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_simpl");
|
if (dumpGraphLevel() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_simpl");
|
||||||
|
|
||||||
UINFO(2, " Move...\n");
|
UINFO(2, " Move...\n");
|
||||||
processMove();
|
processMove();
|
||||||
|
|
@ -1454,7 +1454,7 @@ void OrderProcess::process(bool multiThreaded) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dump data
|
// Dump data
|
||||||
if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_done");
|
if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_done");
|
||||||
}
|
}
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
|
|
|
||||||
|
|
@ -1399,5 +1399,5 @@ public:
|
||||||
void V3Param::param(AstNetlist* rootp) {
|
void V3Param::param(AstNetlist* rootp) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ParamVisitor{rootp}; } // Destruct before checking
|
{ ParamVisitor{rootp}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("param", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("param", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2463,7 +2463,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dumpGraph() >= 4) schedule.dumpDotFilePrefixedAlways(mtaskGraph, "schedule");
|
if (dumpGraphLevel() >= 4) schedule.dumpDotFilePrefixedAlways(mtaskGraph, "schedule");
|
||||||
|
|
||||||
return schedule;
|
return schedule;
|
||||||
}
|
}
|
||||||
|
|
@ -2528,7 +2528,7 @@ private:
|
||||||
// V3Partition implementation
|
// V3Partition implementation
|
||||||
|
|
||||||
void V3Partition::debugMTaskGraphStats(const V3Graph* graphp, const string& stage) {
|
void V3Partition::debugMTaskGraphStats(const V3Graph* graphp, const string& stage) {
|
||||||
if (!debug() && !dump() && !dumpGraph()) return;
|
if (!debug() && !dumpLevel() && !dumpGraphLevel()) return;
|
||||||
|
|
||||||
UINFO(4, "\n");
|
UINFO(4, "\n");
|
||||||
UINFO(4, " Stats for " << stage << endl);
|
UINFO(4, " Stats for " << stage << endl);
|
||||||
|
|
@ -2565,7 +2565,7 @@ void V3Partition::debugMTaskGraphStats(const V3Graph* graphp, const string& stag
|
||||||
if (mtaskCount < 1000) {
|
if (mtaskCount < 1000) {
|
||||||
string filePrefix("ordermv_");
|
string filePrefix("ordermv_");
|
||||||
filePrefix += stage;
|
filePrefix += stage;
|
||||||
if (dumpGraph() >= 4) graphp->dumpDotFilePrefixedAlways(filePrefix);
|
if (dumpGraphLevel() >= 4) graphp->dumpDotFilePrefixedAlways(filePrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look only at the cost of each mtask, neglect communication cost.
|
// Look only at the cost of each mtask, neglect communication cost.
|
||||||
|
|
@ -2740,7 +2740,7 @@ void V3Partition::go(V3Graph* mtasksp) {
|
||||||
// For debug: print out the longest critical path. This allows us to
|
// For debug: print out the longest critical path. This allows us to
|
||||||
// verify that the costs look reasonable, that we aren't combining
|
// verify that the costs look reasonable, that we aren't combining
|
||||||
// nodes that should probably be split, etc.
|
// nodes that should probably be split, etc.
|
||||||
if (dump() >= 3) LogicMTask::dumpCpFilePrefixed(mtasksp, "cp");
|
if (dumpLevel() >= 3) LogicMTask::dumpCpFilePrefixed(mtasksp, "cp");
|
||||||
|
|
||||||
// Merge nodes that could present data hazards; see comment within.
|
// Merge nodes that could present data hazards; see comment within.
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -400,5 +400,5 @@ public:
|
||||||
void V3Premit::premitAll(AstNetlist* nodep) {
|
void V3Premit::premitAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ PremitVisitor{nodep}; } // Destruct before checking
|
{ PremitVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("premit", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("premit", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@ void V3Randomize::randomizeNetlist(AstNetlist* nodep) {
|
||||||
const RandomizeMarkVisitor markVisitor{nodep};
|
const RandomizeMarkVisitor markVisitor{nodep};
|
||||||
RandomizeVisitor{nodep};
|
RandomizeVisitor{nodep};
|
||||||
}
|
}
|
||||||
V3Global::dumpCheckGlobalTree("randomize", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("randomize", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
AstFunc* V3Randomize::newRandomizeFunc(AstClass* nodep) {
|
AstFunc* V3Randomize::newRandomizeFunc(AstClass* nodep) {
|
||||||
|
|
|
||||||
|
|
@ -273,5 +273,5 @@ public:
|
||||||
void V3Reloop::reloopAll(AstNetlist* nodep) {
|
void V3Reloop::reloopAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ReloopVisitor{nodep}; } // Destruct before checking
|
{ ReloopVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("reloop", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("reloop", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1225,7 +1225,7 @@ void schedule(AstNetlist* netlistp) {
|
||||||
|
|
||||||
netlistp->dpiExportTriggerp(nullptr);
|
netlistp->dpiExportTriggerp(nullptr);
|
||||||
|
|
||||||
V3Global::dumpCheckGlobalTree("sched", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("sched", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace V3Sched
|
} // namespace V3Sched
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ LogicByScope breakCycles(AstNetlist* netlistp, LogicByScope& combinationalLogic)
|
||||||
if (graphp->empty()) return LogicByScope{};
|
if (graphp->empty()) return LogicByScope{};
|
||||||
|
|
||||||
// Dump for debug
|
// Dump for debug
|
||||||
if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-comb-cycles");
|
if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-comb-cycles");
|
||||||
|
|
||||||
// Make graph acyclic by cutting some edges. Note: This also colors strongly connected
|
// Make graph acyclic by cutting some edges. Note: This also colors strongly connected
|
||||||
// components which reportCycles uses to print each SCCs separately.
|
// components which reportCycles uses to print each SCCs separately.
|
||||||
|
|
|
||||||
|
|
@ -341,11 +341,11 @@ LogicRegions partition(LogicByScope& clockedLogic, LogicByScope& combinationalLo
|
||||||
// Build the graph
|
// Build the graph
|
||||||
const std::unique_ptr<V3Graph> graphp
|
const std::unique_ptr<V3Graph> graphp
|
||||||
= SchedGraphBuilder::build(clockedLogic, combinationalLogic, hybridLogic);
|
= SchedGraphBuilder::build(clockedLogic, combinationalLogic, hybridLogic);
|
||||||
if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched");
|
if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched");
|
||||||
|
|
||||||
// Partition into Active and NBA regions
|
// Partition into Active and NBA regions
|
||||||
colorActiveRegion(*(graphp.get()));
|
colorActiveRegion(*(graphp.get()));
|
||||||
if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-partitioned", true);
|
if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-partitioned", true);
|
||||||
|
|
||||||
LogicRegions result;
|
LogicRegions result;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -261,13 +261,13 @@ LogicReplicas replicateLogic(LogicRegions& logicRegionsRegions) {
|
||||||
// Build the dataflow (dependency) graph
|
// Build the dataflow (dependency) graph
|
||||||
const std::unique_ptr<Graph> graphp = buildGraph(logicRegionsRegions);
|
const std::unique_ptr<Graph> graphp = buildGraph(logicRegionsRegions);
|
||||||
// Dump for debug
|
// Dump for debug
|
||||||
if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-replicate");
|
if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-replicate");
|
||||||
// Propagate driving region flags
|
// Propagate driving region flags
|
||||||
for (V3GraphVertex* vtxp = graphp->verticesBeginp(); vtxp; vtxp = vtxp->verticesNextp()) {
|
for (V3GraphVertex* vtxp = graphp->verticesBeginp(); vtxp; vtxp = vtxp->verticesNextp()) {
|
||||||
propagateDrivingRegions(static_cast<Vertex*>(vtxp));
|
propagateDrivingRegions(static_cast<Vertex*>(vtxp));
|
||||||
}
|
}
|
||||||
// Dump for debug
|
// Dump for debug
|
||||||
if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-replicate-propagated");
|
if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-replicate-propagated");
|
||||||
// Replicate the necessary logic
|
// Replicate the necessary logic
|
||||||
return replicate(graphp.get());
|
return replicate(graphp.get());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,7 @@ void transformForks(AstNetlist* const netlistp) {
|
||||||
~ForkVisitor() override = default;
|
~ForkVisitor() override = default;
|
||||||
};
|
};
|
||||||
ForkVisitor{netlistp};
|
ForkVisitor{netlistp};
|
||||||
V3Global::dumpCheckGlobalTree("sched_forks", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("sched_forks", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace V3Sched
|
} // namespace V3Sched
|
||||||
|
|
|
||||||
|
|
@ -423,5 +423,5 @@ void V3Scope::scopeAll(AstNetlist* nodep) {
|
||||||
const ScopeVisitor visitor{nodep};
|
const ScopeVisitor visitor{nodep};
|
||||||
ScopeCleanupVisitor{nodep};
|
ScopeCleanupVisitor{nodep};
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("scope", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("scope", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,5 +247,5 @@ public:
|
||||||
void V3Slice::sliceAll(AstNetlist* nodep) {
|
void V3Slice::sliceAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ SliceVisitor{nodep}; } // Destruct before checking
|
{ SliceVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("slice", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("slice", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -456,7 +456,7 @@ protected:
|
||||||
UINFO(5, "ReorderBlock " << nodep << endl);
|
UINFO(5, "ReorderBlock " << nodep << endl);
|
||||||
m_graph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue);
|
m_graph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue);
|
||||||
|
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("reorderg_nodup", false);
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("reorderg_nodup", false);
|
||||||
|
|
||||||
// Mark all the logic for this step
|
// Mark all the logic for this step
|
||||||
// Vertex::m_user begin: true indicates logic for this step
|
// Vertex::m_user begin: true indicates logic for this step
|
||||||
|
|
@ -513,10 +513,10 @@ protected:
|
||||||
// And a real ordering to get the statements into something reasonable
|
// And a real ordering to get the statements into something reasonable
|
||||||
// We don't care if there's cutable violations here...
|
// We don't care if there's cutable violations here...
|
||||||
// Non-cutable violations should be impossible; as those edges are program-order
|
// Non-cutable violations should be impossible; as those edges are program-order
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_preo", false);
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_preo", false);
|
||||||
m_graph.acyclic(&SplitEdge::followCyclic);
|
m_graph.acyclic(&SplitEdge::followCyclic);
|
||||||
m_graph.rank(&SplitEdge::followCyclic); // Or order(), but that's more expensive
|
m_graph.rank(&SplitEdge::followCyclic); // Or order(), but that's more expensive
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_opt", false);
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_opt", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reorderBlock(AstNode* nodep) {
|
void reorderBlock(AstNode* nodep) {
|
||||||
|
|
@ -942,14 +942,14 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_nodup", false);
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_nodup", false);
|
||||||
|
|
||||||
// Weak coloring to determine what needs to remain grouped
|
// Weak coloring to determine what needs to remain grouped
|
||||||
// in a single always. This follows all edges excluding:
|
// in a single always. This follows all edges excluding:
|
||||||
// - those we pruned above
|
// - those we pruned above
|
||||||
// - PostEdges, which are done later
|
// - PostEdges, which are done later
|
||||||
m_graph.weaklyConnected(&SplitEdge::followScoreboard);
|
m_graph.weaklyConnected(&SplitEdge::followScoreboard);
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_colored", false);
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_colored", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void visit(AstAlways* nodep) override {
|
void visit(AstAlways* nodep) override {
|
||||||
|
|
@ -1003,10 +1003,10 @@ private:
|
||||||
void V3Split::splitReorderAll(AstNetlist* nodep) {
|
void V3Split::splitReorderAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ ReorderVisitor{nodep}; } // Destruct before checking
|
{ ReorderVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("reorder", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("reorder", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
void V3Split::splitAlwaysAll(AstNetlist* nodep) {
|
void V3Split::splitAlwaysAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ SplitVisitor{nodep}; } // Destruct before checking
|
{ SplitVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("split", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("split", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,5 +192,5 @@ public:
|
||||||
void V3SplitAs::splitAsAll(AstNetlist* nodep) {
|
void V3SplitAs::splitAsAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ SplitAsVisitor{nodep}; } // Destruct before checking
|
{ SplitAsVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("splitas", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("splitas", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1249,9 +1249,9 @@ void V3SplitVar::splitVariable(AstNetlist* nodep) {
|
||||||
const SplitUnpackedVarVisitor visitor{nodep};
|
const SplitUnpackedVarVisitor visitor{nodep};
|
||||||
refs = visitor.getPackedVarRefs();
|
refs = visitor.getPackedVarRefs();
|
||||||
}
|
}
|
||||||
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTree() >= 9);
|
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeLevel() >= 9);
|
||||||
{ SplitPackedVarVisitor{nodep, refs}; }
|
{ SplitPackedVarVisitor{nodep, refs}; }
|
||||||
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTree() >= 9);
|
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeLevel() >= 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool V3SplitVar::canSplitVar(const AstVar* varp) {
|
bool V3SplitVar::canSplitVar(const AstVar* varp) {
|
||||||
|
|
|
||||||
|
|
@ -384,5 +384,5 @@ public:
|
||||||
void V3Subst::substituteAll(AstNetlist* nodep) {
|
void V3Subst::substituteAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ SubstVisitor{nodep}; } // Destruct before checking
|
{ SubstVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("subst", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("subst", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void dumpFilePrefixed(const string& nameComment) {
|
void dumpFilePrefixed(const string& nameComment) {
|
||||||
if (dumpTree()) {
|
if (dumpTreeLevel()) {
|
||||||
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
||||||
UINFO(2, "Dumping " << filename << endl);
|
UINFO(2, "Dumping " << filename << endl);
|
||||||
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void dumpGraphFilePrefixed(const string& nameComment) const {
|
void dumpGraphFilePrefixed(const string& nameComment) const {
|
||||||
if (::dump()) {
|
if (dumpLevel()) {
|
||||||
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
||||||
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
||||||
if (logp->fail()) v3fatal("Can't write " << filename);
|
if (logp->fail()) v3fatal("Can't write " << filename);
|
||||||
|
|
@ -406,7 +406,7 @@ public:
|
||||||
|
|
||||||
void findEulerTour(std::vector<T_Key>* sortedOutp) {
|
void findEulerTour(std::vector<T_Key>* sortedOutp) {
|
||||||
UASSERT(sortedOutp->empty(), "Output graph must start empty");
|
UASSERT(sortedOutp->empty(), "Output graph must start empty");
|
||||||
if (::dumpGraph() >= 6) dumpDotFilePrefixed("findEulerTour");
|
if (::dumpGraphLevel() >= 6) dumpDotFilePrefixed("findEulerTour");
|
||||||
std::unordered_set<unsigned /*edgeID*/> markedEdges;
|
std::unordered_set<unsigned /*edgeID*/> markedEdges;
|
||||||
// Pick a start node
|
// Pick a start node
|
||||||
Vertex* const start_vertexp = castVertexp(verticesBeginp());
|
Vertex* const start_vertexp = castVertexp(verticesBeginp());
|
||||||
|
|
@ -464,12 +464,12 @@ void V3TSP::tspSort(const V3TSP::StateVec& states, V3TSP::StateVec* resultp) {
|
||||||
// Create the minimum spanning tree
|
// Create the minimum spanning tree
|
||||||
Graph minGraph;
|
Graph minGraph;
|
||||||
graph.makeMinSpanningTree(&minGraph);
|
graph.makeMinSpanningTree(&minGraph);
|
||||||
if (dumpGraph() >= 6) minGraph.dumpGraphFilePrefixed("minGraph");
|
if (dumpGraphLevel() >= 6) minGraph.dumpGraphFilePrefixed("minGraph");
|
||||||
|
|
||||||
const std::vector<const TspStateBase*> oddDegree = minGraph.getOddDegreeKeys();
|
const std::vector<const TspStateBase*> oddDegree = minGraph.getOddDegreeKeys();
|
||||||
Graph matching;
|
Graph matching;
|
||||||
graph.perfectMatching(oddDegree, &matching);
|
graph.perfectMatching(oddDegree, &matching);
|
||||||
if (dumpGraph() >= 6) matching.dumpGraphFilePrefixed("matching");
|
if (dumpGraphLevel() >= 6) matching.dumpGraphFilePrefixed("matching");
|
||||||
|
|
||||||
// Adds edges to minGraph, the resulting graph will have even number of
|
// Adds edges to minGraph, the resulting graph will have even number of
|
||||||
// edge counts at every vertex:
|
// edge counts at every vertex:
|
||||||
|
|
@ -670,12 +670,12 @@ void V3TSP::selfTestString() {
|
||||||
|
|
||||||
Graph minGraph;
|
Graph minGraph;
|
||||||
graph.makeMinSpanningTree(&minGraph);
|
graph.makeMinSpanningTree(&minGraph);
|
||||||
if (dumpGraph() >= 6) minGraph.dumpGraphFilePrefixed("minGraph");
|
if (dumpGraphLevel() >= 6) minGraph.dumpGraphFilePrefixed("minGraph");
|
||||||
|
|
||||||
const std::vector<string> oddDegree = minGraph.getOddDegreeKeys();
|
const std::vector<string> oddDegree = minGraph.getOddDegreeKeys();
|
||||||
Graph matching;
|
Graph matching;
|
||||||
graph.perfectMatching(oddDegree, &matching);
|
graph.perfectMatching(oddDegree, &matching);
|
||||||
if (dumpGraph() >= 6) matching.dumpGraphFilePrefixed("matching");
|
if (dumpGraphLevel() >= 6) matching.dumpGraphFilePrefixed("matching");
|
||||||
|
|
||||||
minGraph.combineGraph(matching);
|
minGraph.combineGraph(matching);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -431,5 +431,5 @@ void TableSimulateVisitor::varRefCb(AstVarRef* nodep) {
|
||||||
void V3Table::tableAll(AstNetlist* nodep) {
|
void V3Table::tableAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ TableVisitor{nodep}; } // Destruct before checking
|
{ TableVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("table", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("table", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@ public:
|
||||||
iterate(nodep);
|
iterate(nodep);
|
||||||
//
|
//
|
||||||
m_callGraph.removeRedundantEdgesSum(&TaskEdge::followAlwaysTrue);
|
m_callGraph.removeRedundantEdgesSum(&TaskEdge::followAlwaysTrue);
|
||||||
if (dumpGraph()) m_callGraph.dumpDotFilePrefixed("task_call");
|
if (dumpGraphLevel()) m_callGraph.dumpDotFilePrefixed("task_call");
|
||||||
}
|
}
|
||||||
~TaskStateVisitor() override = default;
|
~TaskStateVisitor() override = default;
|
||||||
VL_UNCOPYABLE(TaskStateVisitor);
|
VL_UNCOPYABLE(TaskStateVisitor);
|
||||||
|
|
@ -1820,5 +1820,5 @@ void V3Task::taskAll(AstNetlist* nodep) {
|
||||||
TaskStateVisitor visitors{nodep};
|
TaskStateVisitor visitors{nodep};
|
||||||
const TaskVisitor visitor{nodep, &visitors};
|
const TaskVisitor visitor{nodep, &visitors};
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("task", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("task", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -792,7 +792,7 @@ public:
|
||||||
explicit TimingVisitor(AstNetlist* nodep)
|
explicit TimingVisitor(AstNetlist* nodep)
|
||||||
: m_netlistp{nodep} {
|
: m_netlistp{nodep} {
|
||||||
iterate(nodep);
|
iterate(nodep);
|
||||||
if (dumpGraph() >= 6) m_depGraph.dumpDotFilePrefixed("timing_deps");
|
if (dumpGraphLevel() >= 6) m_depGraph.dumpDotFilePrefixed("timing_deps");
|
||||||
}
|
}
|
||||||
~TimingVisitor() override = default;
|
~TimingVisitor() override = default;
|
||||||
};
|
};
|
||||||
|
|
@ -803,5 +803,5 @@ public:
|
||||||
void V3Timing::timingAll(AstNetlist* nodep) {
|
void V3Timing::timingAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
TimingVisitor{nodep};
|
TimingVisitor{nodep};
|
||||||
V3Global::dumpCheckGlobalTree("timing", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("timing", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -734,11 +734,11 @@ private:
|
||||||
detectDuplicates();
|
detectDuplicates();
|
||||||
|
|
||||||
// Simplify & optimize the graph
|
// Simplify & optimize the graph
|
||||||
if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("trace_pre");
|
if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("trace_pre");
|
||||||
graphSimplify(true);
|
graphSimplify(true);
|
||||||
if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("trace_simplified");
|
if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("trace_simplified");
|
||||||
graphOptimize();
|
graphOptimize();
|
||||||
if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("trace_optimized");
|
if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("trace_optimized");
|
||||||
|
|
||||||
// Create the fine grained activity flags
|
// Create the fine grained activity flags
|
||||||
createActivityFlags();
|
createActivityFlags();
|
||||||
|
|
@ -924,5 +924,5 @@ public:
|
||||||
void V3Trace::traceAll(AstNetlist* nodep) {
|
void V3Trace::traceAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ TraceVisitor{nodep}; } // Destruct before checking
|
{ TraceVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("trace", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("trace", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -550,5 +550,5 @@ public:
|
||||||
void V3TraceDecl::traceDeclAll(AstNetlist* nodep) {
|
void V3TraceDecl::traceDeclAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ TraceDeclVisitor{nodep}; } // Destruct before checking
|
{ TraceDeclVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("tracedecl", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("tracedecl", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ public:
|
||||||
for (V3GraphVertex* itp = m_graph.verticesBeginp(); itp; itp = itp->verticesNextp()) {
|
for (V3GraphVertex* itp = m_graph.verticesBeginp(); itp; itp = itp->verticesNextp()) {
|
||||||
graphWalkRecurseBack(static_cast<TristateVertex*>(itp), 0);
|
graphWalkRecurseBack(static_cast<TristateVertex*>(itp), 0);
|
||||||
}
|
}
|
||||||
if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("tri_pos__" + nodep->name());
|
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("tri_pos__" + nodep->name());
|
||||||
}
|
}
|
||||||
void associate(AstNode* fromp, AstNode* top) {
|
void associate(AstNode* fromp, AstNode* top) {
|
||||||
new V3GraphEdge{&m_graph, makeVertex(fromp), makeVertex(top), 1};
|
new V3GraphEdge{&m_graph, makeVertex(fromp), makeVertex(top), 1};
|
||||||
|
|
@ -1818,5 +1818,5 @@ public:
|
||||||
void V3Tristate::tristateAll(AstNetlist* nodep) {
|
void V3Tristate::tristateAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ TristateVisitor{nodep}; } // Destruct before checking
|
{ TristateVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("tristate", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("tristate", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -519,5 +519,5 @@ public:
|
||||||
void V3Unknown::unknownAll(AstNetlist* nodep) {
|
void V3Unknown::unknownAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ UnknownVisitor{nodep}; } // Destruct before checking
|
{ UnknownVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("unknown", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("unknown", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -518,5 +518,5 @@ void V3Unroll::unrollAll(AstNetlist* nodep) {
|
||||||
UnrollStateful unroller;
|
UnrollStateful unroller;
|
||||||
unroller.unrollAll(nodep);
|
unroller.unrollAll(nodep);
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("unroll", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("unroll", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,5 +207,5 @@ void V3VariableOrder::orderAll() {
|
||||||
modp = VN_AS(modp->nextp(), NodeModule)) {
|
modp = VN_AS(modp->nextp(), NodeModule)) {
|
||||||
VariableOrder::processModule(modp);
|
VariableOrder::processModule(modp);
|
||||||
}
|
}
|
||||||
V3Global::dumpCheckGlobalTree("variableorder", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("variableorder", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7441,7 +7441,7 @@ void V3Width::width(AstNetlist* nodep) {
|
||||||
WidthRemoveVisitor rvisitor;
|
WidthRemoveVisitor rvisitor;
|
||||||
(void)rvisitor.mainAcceptEdit(nodep);
|
(void)rvisitor.mainAcceptEdit(nodep);
|
||||||
} // Destruct before checking
|
} // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("width", 0, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("width", 0, dumpTreeLevel() >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Single node parameter propagation
|
//! Single node parameter propagation
|
||||||
|
|
@ -7477,5 +7477,5 @@ AstNode* V3Width::widthGenerateParamsEdit(
|
||||||
void V3Width::widthCommit(AstNetlist* nodep) {
|
void V3Width::widthCommit(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||||
{ WidthCommitVisitor{nodep}; } // Destruct before checking
|
{ WidthCommitVisitor{nodep}; } // Destruct before checking
|
||||||
V3Global::dumpCheckGlobalTree("widthcommit", 0, dumpTree() >= 6);
|
V3Global::dumpCheckGlobalTree("widthcommit", 0, dumpTreeLevel() >= 6);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ static void verilate(const string& argString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Final steps
|
// Final steps
|
||||||
V3Global::dumpCheckGlobalTree("final", 990, dumpTree() >= 3);
|
V3Global::dumpCheckGlobalTree("final", 990, dumpTreeLevel() >= 3);
|
||||||
|
|
||||||
V3Error::abortIfErrors();
|
V3Error::abortIfErrors();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue