Internals: Add serializeOnly() and dumpTreeEitherLevel() (#4815) (#4715). No functional change intended.
This commit is contained in:
parent
19cb366e5d
commit
5f52c066e5
|
|
@ -161,6 +161,7 @@ Srinivasan Venkataramanan
|
|||
Stefan Wallentowitz
|
||||
Stephen Henry
|
||||
Steven Hugg
|
||||
Szymon Gizler
|
||||
Sören Tempel
|
||||
Teng Huang
|
||||
Tim Hutt
|
||||
|
|
|
|||
|
|
@ -648,5 +648,5 @@ public:
|
|||
void V3Active::activeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ActiveVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("active", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("active", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,5 +142,5 @@ public:
|
|||
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ActiveTopVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("activetop", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("activetop", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -540,5 +540,5 @@ public:
|
|||
void V3Assert::assertAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ AssertVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("assert", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("assert", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -495,5 +495,5 @@ public:
|
|||
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ AssertPreVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,5 +366,5 @@ void V3Begin::debeginAll(AstNetlist* nodep) {
|
|||
{ BeginVisitor{nodep, &state}; }
|
||||
if (state.anyFuncInBegin()) { BeginRelinkVisitor{nodep, &state}; }
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("begin", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("begin", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,5 +252,5 @@ void V3CCtors::cctorsAll() {
|
|||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
evalAsserts();
|
||||
{ CCtorsVisitor{v3Global.rootp()}; }
|
||||
V3Global::dumpCheckGlobalTree("cctors", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("cctors", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,5 +117,5 @@ void V3CUse::cUseAll() {
|
|||
// for each output file and put under that
|
||||
CUseVisitor{modp};
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("cuse", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("cuse", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ public:
|
|||
void V3Case::caseAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ CaseVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("case", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("case", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
void V3Case::caseLint(AstNodeCase* nodep) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
|
|
|
|||
|
|
@ -236,5 +236,5 @@ public:
|
|||
void V3Cast::castAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ CastVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("cast", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("cast", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,5 +240,5 @@ public:
|
|||
void V3Class::classAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ClassVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("class", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("class", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,5 +320,5 @@ public:
|
|||
void V3Clean::cleanAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ CleanVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("clean", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("clean", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,5 +217,5 @@ public:
|
|||
void V3Clock::clockAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ClockVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("clock", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("clock", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,5 +235,5 @@ public:
|
|||
void V3Combine::combineAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
CombineVisitor::apply(nodep);
|
||||
V3Global::dumpCheckGlobalTree("combine", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("combine", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,5 +172,5 @@ void V3Common::commonAll() {
|
|||
if (!dtypep->packed()) makeVlToString(dtypep);
|
||||
}
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("common", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("common", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3881,7 +3881,7 @@ void V3Const::constifyAllLint(AstNetlist* nodep) {
|
|||
ConstVisitor visitor{ConstVisitor::PROC_V_WARN, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Const::constifyCpp(AstNetlist* nodep) {
|
||||
|
|
@ -3890,7 +3890,7 @@ void V3Const::constifyCpp(AstNetlist* nodep) {
|
|||
ConstVisitor visitor{ConstVisitor::PROC_CPP, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("const_cpp", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("const_cpp", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
AstNode* V3Const::constifyEdit(AstNode* nodep) {
|
||||
|
|
@ -3914,7 +3914,7 @@ void V3Const::constifyAllLive(AstNetlist* nodep) {
|
|||
ConstVisitor visitor{ConstVisitor::PROC_LIVE, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Const::constifyAll(AstNetlist* nodep) {
|
||||
|
|
@ -3924,7 +3924,7 @@ void V3Const::constifyAll(AstNetlist* nodep) {
|
|||
ConstVisitor visitor{ConstVisitor::PROC_V_EXPENSIVE, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("const", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
AstNode* V3Const::constifyExpensiveEdit(AstNode* nodep) {
|
||||
|
|
|
|||
|
|
@ -556,5 +556,5 @@ public:
|
|||
void V3Coverage::coverage(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ CoverageVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("coverage", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("coverage", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,5 +114,5 @@ public:
|
|||
void V3CoverageJoin::coverageJoin(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ CoverageJoinVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -543,29 +543,29 @@ void V3Dead::deadifyModules(AstNetlist* nodep) {
|
|||
{
|
||||
DeadVisitor{nodep, false, false, false, false, !v3Global.opt.topIfacesSupported()};
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadModules", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("deadModules", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DeadVisitor{nodep, false, true, false, false, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyDTypesScoped(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DeadVisitor{nodep, false, true, true, false, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DeadVisitor{nodep, true, true, false, true, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyAllScoped(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DeadVisitor{nodep, true, true, true, true, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -649,5 +649,5 @@ public:
|
|||
void V3Delayed::delayedAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DelayedVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("delayed", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("delayed", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,5 +160,5 @@ public:
|
|||
void V3Depth::depthAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DepthVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("depth", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("depth", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,5 +121,5 @@ public:
|
|||
void V3DepthBlock::depthBlockAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DepthBlockVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -300,5 +300,5 @@ public:
|
|||
void V3Descope::descopeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DescopeVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("descope", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("descope", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void V3DfgOptimizer::extract(AstNetlist* netlistp) {
|
|||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
// Extract more optimization candidates
|
||||
DataflowExtractVisitor::apply(netlistp);
|
||||
V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||
|
|
@ -300,5 +300,5 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
|||
AstModule* const resultModp = V3DfgPasses::dfgToAst(*dfg, ctx);
|
||||
UASSERT_OBJ(resultModp == modp, modp, "Should be the same module");
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("dfg-optimize", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("dfg-optimize", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -680,6 +680,7 @@ void v3errorEndFatal(std::ostringstream& sstr)
|
|||
VL_DEFINE_DUMP(DfgLevel, "dfg"); /* Define 'int dumpDfgLevel()' for --dumpi-level */ \
|
||||
VL_DEFINE_DUMP(GraphLevel, "graph"); /* Define 'int dumpGraphLevel()' for dumpi-graph */ \
|
||||
VL_DEFINE_DUMP(TreeLevel, "tree"); /* Define 'int dumpTreeLevel()' for dumpi-tree */ \
|
||||
VL_ATTR_UNUSED static int dumpTreeEitherLevel() { return dumpTreeLevel(); } \
|
||||
static_assert(true, "")
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -963,5 +963,5 @@ void V3Expand::expandAll(AstNetlist* nodep) {
|
|||
ExpandOkVisitor okVisitor{nodep};
|
||||
ExpandVisitor{nodep};
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("expand", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("expand", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -328,5 +328,5 @@ void V3Force::forceAll(AstNetlist* nodep) {
|
|||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
if (!v3Global.hasForceableSignals()) return;
|
||||
ForceConvertVisitor::apply(nodep);
|
||||
V3Global::dumpCheckGlobalTree("force", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("force", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -659,11 +659,11 @@ public:
|
|||
void V3Fork::makeDynamicScopes(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ DynScopeVisitor{nodep}; }
|
||||
V3Global::dumpCheckGlobalTree("fork_dynscope", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("fork_dynscope", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Fork::makeTasks(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ForkVisitor{nodep}; }
|
||||
V3Global::dumpCheckGlobalTree("fork", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("fork", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1381,5 +1381,5 @@ void V3Gate::gateAll(AstNetlist* netlistp) {
|
|||
if (dumpGraphLevel() >= 3) graphp->dumpDotFilePrefixed("gate_final");
|
||||
}
|
||||
|
||||
V3Global::dumpCheckGlobalTree("gate", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("gate", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -640,5 +640,5 @@ void V3Inline::inlineAll(AstNetlist* nodep) {
|
|||
}
|
||||
}
|
||||
|
||||
V3Global::dumpCheckGlobalTree("inline", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("inline", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -610,11 +610,11 @@ void V3Inst::checkOutputShort(AstPin* nodep) {
|
|||
void V3Inst::instAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ InstVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("inst", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("inst", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Inst::dearrayAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ InstDeVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("dearray", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("dearray", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,5 +113,5 @@ void V3Interface::interfaceAll(AstNetlist* nodep) {
|
|||
|
||||
{ InlineIntfRefVisitor{nodep}; }
|
||||
|
||||
V3Global::dumpCheckGlobalTree("interface", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("interface", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -503,5 +503,5 @@ void V3Life::lifeAll(AstNetlist* nodep) {
|
|||
LifeTopVisitor{nodep, &state};
|
||||
} // Destruct before checking
|
||||
VIsCached::clearCacheTree(); // Removing assignments may affect isPure
|
||||
V3Global::dumpCheckGlobalTree("life", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("life", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -362,5 +362,5 @@ void V3LifePost::lifepostAll(AstNetlist* nodep) {
|
|||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
// Mark redundant AssignPost
|
||||
{ LifePostDlyVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("life_post", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("life_post", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3791,18 +3791,24 @@ public:
|
|||
|
||||
void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
||||
VIsCached::clearCacheTree(); // Avoid using any stale isPure
|
||||
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||
if (dumpTreeEitherLevel() >= 9) {
|
||||
V3Global::dumpCheckGlobalTree("prelinkdot");
|
||||
} else if (debug() >= 5) { // on high dbg level, dump even if not explicitly told to
|
||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot.tree"));
|
||||
}
|
||||
LinkDotState state{rootp, step};
|
||||
const LinkDotFindVisitor visitor{rootp, &state};
|
||||
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||
if (dumpTreeEitherLevel() >= 9) {
|
||||
V3Global::dumpCheckGlobalTree("prelinkdot-find");
|
||||
} else if (debug() >= 5) {
|
||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-find.tree"));
|
||||
}
|
||||
if (step == LDS_PRIMARY || step == LDS_PARAMED) {
|
||||
// Initial link stage, resolve parameters
|
||||
const LinkDotParamVisitor visitors{rootp, &state};
|
||||
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||
if (dumpTreeEitherLevel() >= 9) {
|
||||
V3Global::dumpCheckGlobalTree("prelinkdot-param");
|
||||
} else if (debug() >= 5) {
|
||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-param.tree"));
|
||||
}
|
||||
} else if (step == LDS_ARRAYED) {
|
||||
|
|
@ -3811,7 +3817,9 @@ void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
|||
// process AstScope's. This needs to be separate pass after whole hierarchy graph created.
|
||||
const LinkDotScopeVisitor visitors{rootp, &state};
|
||||
v3Global.assertScoped(true);
|
||||
if (debug() >= 5 || dumpTreeLevel() >= 9) {
|
||||
if (dumpTreeEitherLevel() >= 9) {
|
||||
V3Global::dumpCheckGlobalTree("prelinkdot-scoped");
|
||||
} else if (debug() >= 5) {
|
||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-scoped.tree"));
|
||||
}
|
||||
} else {
|
||||
|
|
@ -3829,23 +3837,23 @@ void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) {
|
|||
void V3LinkDot::linkDotPrimary(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
linkDotGuts(nodep, LDS_PRIMARY);
|
||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
||||
void V3LinkDot::linkDotParamed(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
linkDotGuts(nodep, LDS_PARAMED);
|
||||
V3Global::dumpCheckGlobalTree("linkdotparam", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("linkdotparam", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3LinkDot::linkDotArrayed(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
linkDotGuts(nodep, LDS_ARRAYED);
|
||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
||||
void V3LinkDot::linkDotScope(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
linkDotGuts(nodep, LDS_SCOPED);
|
||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,5 +305,5 @@ public:
|
|||
void V3LinkInc::linkIncrements(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ LinkIncVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,5 +348,5 @@ public:
|
|||
void V3LinkJump::linkJump(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ LinkJumpVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ public:
|
|||
void V3LinkLValue::linkLValue(AstNetlist* nodep) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
{ LinkLValueVisitor{nodep, VAccess::NOCHANGE}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
void V3LinkLValue::linkLValueSet(AstNode* nodep) {
|
||||
// Called by later link functions when it is known a node needs
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ void V3LinkLevel::modSortByLevel() {
|
|||
UASSERT_OBJ(!v3Global.rootp()->modulesp(), v3Global.rootp(), "Unlink didn't work");
|
||||
for (AstNodeModule* nodep : mods) v3Global.rootp()->addModulesp(nodep);
|
||||
UINFO(9, "modSortByLevel() done\n"); // Comment required for gcc4.6.3 / bug666
|
||||
V3Global::dumpCheckGlobalTree("cells", false, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("cells", false, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3LinkLevel::timescaling(const ModVec& mods) {
|
||||
|
|
@ -178,7 +178,7 @@ void V3LinkLevel::wrapTop(AstNetlist* rootp) {
|
|||
}
|
||||
}
|
||||
|
||||
V3Global::dumpCheckGlobalTree("wraptop", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("wraptop", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
||||
void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
||||
|
|
|
|||
|
|
@ -919,5 +919,5 @@ public:
|
|||
void V3LinkParse::linkParse(AstNetlist* rootp) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
{ LinkParseVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -515,5 +515,5 @@ void V3LinkResolve::linkResolve(AstNetlist* rootp) {
|
|||
const LinkResolveVisitor visitor{rootp};
|
||||
LinkBotupVisitor{rootp};
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkresolve", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("linkresolve", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,5 +219,5 @@ public:
|
|||
void V3Localize::localizeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ LocalizeVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("localize", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("localize", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -884,5 +884,5 @@ public:
|
|||
void V3MergeCond::mergeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ MergeCondVisitor{nodep}; }
|
||||
V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,5 +141,5 @@ public:
|
|||
void V3Name::nameAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ NameVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("name", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("name", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ void V3Options::notify() VL_MT_DISABLED {
|
|||
FileLine* const cmdfl = new FileLine{FileLine::commandLineFilename()};
|
||||
|
||||
if (!outFormatOk() && v3Global.opt.main()) ccSet(); // --main implies --cc if not provided
|
||||
if (!outFormatOk() && !dpiHdrOnly() && !lintOnly() && !preprocOnly() && !xmlOnly()) {
|
||||
if (!outFormatOk() && !dpiHdrOnly() && !lintOnly() && !preprocOnly() && !serializeOnly()) {
|
||||
v3fatal("verilator: Need --binary, --cc, --sc, --dpi-hdr-only, --lint-only, "
|
||||
"--xml-only or --E option");
|
||||
}
|
||||
|
|
@ -847,14 +847,14 @@ void V3Options::notify() VL_MT_DISABLED {
|
|||
!v3Global.opt.dpiHdrOnly() //
|
||||
&& !v3Global.opt.lintOnly() //
|
||||
&& !v3Global.opt.preprocOnly() //
|
||||
&& !v3Global.opt.xmlOnly());
|
||||
&& !v3Global.opt.serializeOnly());
|
||||
}
|
||||
if (v3Global.opt.makeDepend().isDefault()) {
|
||||
v3Global.opt.m_makeDepend.setTrueOrFalse( //
|
||||
!v3Global.opt.dpiHdrOnly() //
|
||||
&& !v3Global.opt.lintOnly() //
|
||||
&& !v3Global.opt.preprocOnly() //
|
||||
&& !v3Global.opt.xmlOnly());
|
||||
&& !v3Global.opt.serializeOnly());
|
||||
}
|
||||
|
||||
if (trace()) {
|
||||
|
|
|
|||
|
|
@ -516,6 +516,7 @@ public:
|
|||
bool vpi() const { return m_vpi; }
|
||||
bool xInitialEdge() const { return m_xInitialEdge; }
|
||||
bool xmlOnly() const { return m_xmlOnly; }
|
||||
bool serializeOnly() const { return m_xmlOnly; }
|
||||
bool topIfacesSupported() const { return lintOnly() && !hierarchical(); }
|
||||
|
||||
int buildJobs() const VL_MT_SAFE { return m_buildJobs; }
|
||||
|
|
|
|||
|
|
@ -1479,5 +1479,5 @@ public:
|
|||
void V3Param::param(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ParamVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("param", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("param", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -345,5 +345,5 @@ public:
|
|||
void V3Premit::premitAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ PremitVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("premit", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("premit", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ void V3Randomize::randomizeNetlist(AstNetlist* nodep) {
|
|||
const RandomizeMarkVisitor markVisitor{nodep};
|
||||
RandomizeVisitor{nodep};
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("randomize", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("randomize", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
AstFunc* V3Randomize::newRandomizeFunc(AstClass* nodep) {
|
||||
|
|
|
|||
|
|
@ -268,5 +268,5 @@ public:
|
|||
void V3Reloop::reloopAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ReloopVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("reloop", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("reloop", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1383,7 +1383,7 @@ void schedule(AstNetlist* netlistp) {
|
|||
|
||||
netlistp->dpiExportTriggerp(nullptr);
|
||||
|
||||
V3Global::dumpCheckGlobalTree("sched", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("sched", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
} // namespace V3Sched
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ void transformForks(AstNetlist* const netlistp) {
|
|||
~ForkVisitor() override = default;
|
||||
};
|
||||
ForkVisitor{netlistp};
|
||||
V3Global::dumpCheckGlobalTree("sched_forks", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("sched_forks", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
||||
} // namespace V3Sched
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ VirtIfaceTriggers makeVirtIfaceTriggers(AstNetlist* nodep) {
|
|||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
if (v3Global.hasVirtIfaces()) {
|
||||
VirtIfaceVisitor visitor{nodep};
|
||||
V3Global::dumpCheckGlobalTree("sched_vif", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("sched_vif", 0, dumpTreeEitherLevel() >= 6);
|
||||
return visitor.take_triggers();
|
||||
}
|
||||
return {};
|
||||
|
|
|
|||
|
|
@ -416,5 +416,5 @@ void V3Scope::scopeAll(AstNetlist* nodep) {
|
|||
const ScopeVisitor visitor{nodep};
|
||||
ScopeCleanupVisitor{nodep};
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("scope", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("scope", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -335,5 +335,5 @@ public:
|
|||
void V3Slice::sliceAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ SliceVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("slice", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("slice", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1005,10 +1005,10 @@ private:
|
|||
void V3Split::splitReorderAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ ReorderVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("reorder", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("reorder", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
void V3Split::splitAlwaysAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ SplitVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("split", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("split", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,5 +192,5 @@ public:
|
|||
void V3SplitAs::splitAsAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ SplitAsVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("splitas", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("splitas", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1242,9 +1242,9 @@ void V3SplitVar::splitVariable(AstNetlist* nodep) {
|
|||
const SplitUnpackedVarVisitor visitor{nodep};
|
||||
refs = visitor.getPackedVarRefs();
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeLevel() >= 9);
|
||||
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeEitherLevel() >= 9);
|
||||
{ SplitPackedVarVisitor{nodep, refs}; }
|
||||
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeLevel() >= 9);
|
||||
V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeEitherLevel() >= 9);
|
||||
}
|
||||
|
||||
bool V3SplitVar::canSplitVar(const AstVar* varp) {
|
||||
|
|
|
|||
|
|
@ -384,5 +384,5 @@ public:
|
|||
void V3Subst::substituteAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ SubstVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("subst", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("subst", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,5 +427,5 @@ void TableSimulateVisitor::varRefCb(AstVarRef* nodep) {
|
|||
void V3Table::tableAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ TableVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("table", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("table", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1981,5 +1981,5 @@ void V3Task::taskAll(AstNetlist* nodep) {
|
|||
TaskStateVisitor visitors{nodep};
|
||||
const TaskVisitor visitor{nodep, &visitors};
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("task", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("task", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1237,5 +1237,5 @@ void V3Timing::timingAll(AstNetlist* nodep) {
|
|||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
TimingSuspendableVisitor susVisitor{nodep};
|
||||
if (v3Global.usesTiming()) TimingControlVisitor{nodep};
|
||||
V3Global::dumpCheckGlobalTree("timing", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("timing", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -918,5 +918,5 @@ public:
|
|||
void V3Trace::traceAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ TraceVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("trace", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("trace", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -691,5 +691,5 @@ public:
|
|||
void V3TraceDecl::traceDeclAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ TraceDeclVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("tracedecl", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("tracedecl", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1814,5 +1814,5 @@ public:
|
|||
void V3Tristate::tristateAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ TristateVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("tristate", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("tristate", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -525,5 +525,5 @@ public:
|
|||
void V3Unknown::unknownAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ UnknownVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("unknown", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("unknown", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -512,5 +512,5 @@ void V3Unroll::unrollAll(AstNetlist* nodep) {
|
|||
UnrollStateful unroller;
|
||||
unroller.unrollAll(nodep);
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("unroll", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("unroll", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,5 +202,5 @@ void V3VariableOrder::orderAll() {
|
|||
modp = VN_AS(modp->nextp(), NodeModule)) {
|
||||
VariableOrder::processModule(modp);
|
||||
}
|
||||
V3Global::dumpCheckGlobalTree("variableorder", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("variableorder", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7620,7 +7620,7 @@ void V3Width::width(AstNetlist* nodep) {
|
|||
WidthRemoveVisitor rvisitor;
|
||||
(void)rvisitor.mainAcceptEdit(nodep);
|
||||
} // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("width", 0, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("width", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
//! Single node parameter propagation
|
||||
//! Smaller step... Only do a single node for parameter propagation
|
||||
|
|
|
|||
|
|
@ -232,5 +232,5 @@ public:
|
|||
void V3WidthCommit::widthCommit(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
{ WidthCommitVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("widthcommit", 0, dumpTreeLevel() >= 6);
|
||||
V3Global::dumpCheckGlobalTree("widthcommit", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ static void process() {
|
|||
if (v3Global.opt.stats()) V3Stats::statsStageAll(v3Global.rootp(), "Link");
|
||||
if (v3Global.opt.debugExitUvm23()) {
|
||||
V3Error::abortIfErrors();
|
||||
if (v3Global.opt.xmlOnly()) V3EmitXml::emitxml();
|
||||
if (v3Global.opt.serializeOnly()) V3EmitXml::emitxml();
|
||||
cout << "--debug-exit-uvm23: Exiting after UVM-supported pass\n";
|
||||
std::exit(0);
|
||||
}
|
||||
|
|
@ -168,7 +168,8 @@ static void process() {
|
|||
v3Global.checkTree();
|
||||
|
||||
// Create a hierarchical Verilation plan
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && v3Global.opt.hierarchical()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly()
|
||||
&& v3Global.opt.hierarchical()) {
|
||||
V3HierBlockPlan::createPlan(v3Global.rootp());
|
||||
// If a plan is created, further analysis is not necessary.
|
||||
// The actual Verilation will be done based on this plan.
|
||||
|
|
@ -179,7 +180,7 @@ static void process() {
|
|||
}
|
||||
if (v3Global.opt.debugExitUvm()) {
|
||||
V3Error::abortIfErrors();
|
||||
if (v3Global.opt.xmlOnly()) V3EmitXml::emitxml();
|
||||
if (v3Global.opt.serializeOnly()) V3EmitXml::emitxml();
|
||||
cout << "--debug-exit-uvm: Exiting after UVM-supported pass\n";
|
||||
std::exit(0);
|
||||
}
|
||||
|
|
@ -215,7 +216,7 @@ static void process() {
|
|||
//
|
||||
V3Assert::assertAll(v3Global.rootp());
|
||||
|
||||
if (!(v3Global.opt.xmlOnly() && !v3Global.opt.flatten())) {
|
||||
if (!(v3Global.opt.serializeOnly() && !v3Global.opt.flatten())) {
|
||||
// Add top level wrapper with instance pointing to old top
|
||||
// Move packages to under new top
|
||||
// Must do this after we know parameters and dtypes (as don't clone dtype decls)
|
||||
|
|
@ -225,7 +226,7 @@ static void process() {
|
|||
// Propagate constants into expressions
|
||||
if (v3Global.opt.fConstBeforeDfg()) V3Const::constifyAllLint(v3Global.rootp());
|
||||
|
||||
if (!(v3Global.opt.xmlOnly() && !v3Global.opt.flatten())) {
|
||||
if (!(v3Global.opt.serializeOnly() && !v3Global.opt.flatten())) {
|
||||
// Split packed variables into multiple pieces to resolve UNOPTFLAT.
|
||||
// should be after constifyAllLint() which flattens to 1D bit vector
|
||||
V3SplitVar::splitVariable(v3Global.rootp());
|
||||
|
|
@ -250,7 +251,7 @@ static void process() {
|
|||
V3Tristate::tristateAll(v3Global.rootp());
|
||||
}
|
||||
|
||||
if (!v3Global.opt.xmlOnly()) {
|
||||
if (!v3Global.opt.serializeOnly()) {
|
||||
// Move assignments from X into MODULE temps.
|
||||
// (Before flattening, so each new X variable is shared between all scopes of that
|
||||
// module.)
|
||||
|
|
@ -268,7 +269,7 @@ static void process() {
|
|||
V3DfgOptimizer::optimize(v3Global.rootp(), " pre inline");
|
||||
}
|
||||
|
||||
if (!(v3Global.opt.xmlOnly() && !v3Global.opt.flatten())) {
|
||||
if (!(v3Global.opt.serializeOnly() && !v3Global.opt.flatten())) {
|
||||
// Module inlining
|
||||
// Cannot remove dead variables after this, as alias information for final
|
||||
// V3Scope's V3LinkDot is in the AstVar.
|
||||
|
|
@ -298,7 +299,7 @@ static void process() {
|
|||
|
||||
// --FLATTENING---------------
|
||||
|
||||
if (!(v3Global.opt.xmlOnly() && !v3Global.opt.flatten())) {
|
||||
if (!(v3Global.opt.serializeOnly() && !v3Global.opt.flatten())) {
|
||||
// We're going to flatten the hierarchy, so as many optimizations that
|
||||
// can be done as possible should be before this....
|
||||
|
||||
|
|
@ -318,25 +319,25 @@ static void process() {
|
|||
|
||||
// --SCOPE BASED OPTIMIZATIONS--------------
|
||||
|
||||
if (!(v3Global.opt.xmlOnly() && !v3Global.opt.flatten())) {
|
||||
if (!(v3Global.opt.serializeOnly() && !v3Global.opt.flatten())) {
|
||||
// Cleanup
|
||||
V3Const::constifyAll(v3Global.rootp());
|
||||
V3Dead::deadifyDTypesScoped(v3Global.rootp());
|
||||
v3Global.checkTree();
|
||||
}
|
||||
|
||||
if (!v3Global.opt.xmlOnly()) {
|
||||
if (!v3Global.opt.serializeOnly()) {
|
||||
// Convert case statements to if() blocks. Must be after V3Unknown
|
||||
// Must be before V3Task so don't need to deal with task in case value compares
|
||||
V3Case::caseAll(v3Global.rootp());
|
||||
}
|
||||
|
||||
if (!(v3Global.opt.xmlOnly() && !v3Global.opt.flatten())) {
|
||||
if (!(v3Global.opt.serializeOnly() && !v3Global.opt.flatten())) {
|
||||
// Inline all tasks
|
||||
V3Task::taskAll(v3Global.rootp());
|
||||
}
|
||||
|
||||
if (!v3Global.opt.xmlOnly()) {
|
||||
if (!v3Global.opt.serializeOnly()) {
|
||||
// Add __PVT's
|
||||
// After V3Task so task internal variables will get renamed
|
||||
V3Name::nameAll(v3Global.rootp());
|
||||
|
|
@ -449,7 +450,7 @@ static void process() {
|
|||
|
||||
// --MODULE OPTIMIZATIONS--------------
|
||||
|
||||
if (!v3Global.opt.xmlOnly()) {
|
||||
if (!v3Global.opt.serializeOnly()) {
|
||||
// Split deep blocks to appease MSVC++. Must be before Localize.
|
||||
if (!v3Global.opt.lintOnly() && v3Global.opt.compLimitBlocks()) {
|
||||
V3DepthBlock::depthBlockAll(v3Global.rootp());
|
||||
|
|
@ -472,7 +473,7 @@ static void process() {
|
|||
|
||||
// --GENERATION------------------
|
||||
|
||||
if (!v3Global.opt.xmlOnly()) {
|
||||
if (!v3Global.opt.serializeOnly()) {
|
||||
// Remove unused vars
|
||||
V3Const::constifyAll(v3Global.rootp());
|
||||
V3Dead::deadifyAll(v3Global.rootp());
|
||||
|
|
@ -489,24 +490,24 @@ static void process() {
|
|||
}
|
||||
|
||||
// Expand macros and wide operators into C++ primitives
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && v3Global.opt.fExpand()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly() && v3Global.opt.fExpand()) {
|
||||
V3Expand::expandAll(v3Global.rootp());
|
||||
}
|
||||
|
||||
// Propagate constants across WORDSEL arrayed temporaries
|
||||
if (!v3Global.opt.xmlOnly() && v3Global.opt.fSubst()) {
|
||||
if (!v3Global.opt.serializeOnly() && v3Global.opt.fSubst()) {
|
||||
// Constant folding of expanded stuff
|
||||
V3Const::constifyCpp(v3Global.rootp());
|
||||
V3Subst::substituteAll(v3Global.rootp());
|
||||
}
|
||||
|
||||
if (!v3Global.opt.xmlOnly() && v3Global.opt.fSubstConst()) {
|
||||
if (!v3Global.opt.serializeOnly() && v3Global.opt.fSubstConst()) {
|
||||
// Constant folding of substitutions
|
||||
V3Const::constifyCpp(v3Global.rootp());
|
||||
V3Dead::deadifyAll(v3Global.rootp());
|
||||
}
|
||||
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly()) {
|
||||
if (v3Global.opt.fMergeCond()) {
|
||||
// Merge conditionals
|
||||
V3MergeCond::mergeAll(v3Global.rootp());
|
||||
|
|
@ -531,11 +532,11 @@ static void process() {
|
|||
}
|
||||
|
||||
V3Error::abortIfErrors();
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly()) { //
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly()) { //
|
||||
V3CCtors::cctorsAll();
|
||||
}
|
||||
|
||||
if (!v3Global.opt.xmlOnly() && v3Global.opt.mtasks()) {
|
||||
if (!v3Global.opt.serializeOnly() && v3Global.opt.mtasks()) {
|
||||
// Finalize our MTask cost estimates and pack the mtasks into
|
||||
// threads. Must happen pre-EmitC which relies on the packing
|
||||
// order. Must happen post-V3LifePost which changes the relative
|
||||
|
|
@ -543,7 +544,8 @@ static void process() {
|
|||
V3Partition::finalize(v3Global.rootp());
|
||||
}
|
||||
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && !v3Global.opt.dpiHdrOnly()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly()
|
||||
&& !v3Global.opt.dpiHdrOnly()) {
|
||||
// Add common methods/etc to modules
|
||||
V3Common::commonAll();
|
||||
|
||||
|
|
@ -555,7 +557,8 @@ static void process() {
|
|||
}
|
||||
|
||||
// Output the text
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && !v3Global.opt.dpiHdrOnly()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly()
|
||||
&& !v3Global.opt.dpiHdrOnly()) {
|
||||
// emitcInlines is first, as it may set needHInlines which other emitters read
|
||||
V3EmitC::emitcInlines();
|
||||
V3EmitC::emitcSyms();
|
||||
|
|
@ -567,13 +570,13 @@ static void process() {
|
|||
V3EmitC::emitcSyms(true);
|
||||
}
|
||||
}
|
||||
if (!v3Global.opt.xmlOnly()
|
||||
if (!v3Global.opt.serializeOnly()
|
||||
&& !v3Global.opt.dpiHdrOnly()) { // Unfortunately we have some lint checks in emitcImp.
|
||||
V3EmitC::emitcImp();
|
||||
}
|
||||
{
|
||||
const V3MtDisabledLockGuard mtDisabler{v3MtDisabledLock()};
|
||||
if (v3Global.opt.xmlOnly()
|
||||
if (v3Global.opt.serializeOnly()
|
||||
// Check XML when debugging to make sure no missing node types
|
||||
|| (v3Global.opt.debugCheck() && !v3Global.opt.lintOnly()
|
||||
&& !v3Global.opt.dpiHdrOnly())) {
|
||||
|
|
@ -590,7 +593,8 @@ static void process() {
|
|||
V3EmitC::emitcFiles();
|
||||
}
|
||||
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && !v3Global.opt.dpiHdrOnly()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.serializeOnly()
|
||||
&& !v3Global.opt.dpiHdrOnly()) {
|
||||
if (v3Global.opt.main()) V3EmitCMain::emit();
|
||||
|
||||
// V3EmitMk/V3EmitCMake must be after all other emitters,
|
||||
|
|
@ -679,7 +683,7 @@ static void verilate(const string& argString) {
|
|||
}
|
||||
|
||||
// Final steps
|
||||
V3Global::dumpCheckGlobalTree("final", 990, dumpTreeLevel() >= 3);
|
||||
V3Global::dumpCheckGlobalTree("final", 990, dumpTreeEitherLevel() >= 3);
|
||||
|
||||
V3Error::abortIfErrors();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue