Tests: UVM passes V3Param stage

This commit is contained in:
Wilson Snyder 2023-09-09 11:54:55 -04:00
parent 4de25369da
commit cb5466a90b
3 changed files with 11 additions and 2 deletions

View File

@ -1173,6 +1173,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
DECL_OPTION("-debug-emitv", OnOff, &m_debugEmitV).undocumented();
DECL_OPTION("-debug-exit-parse", OnOff, &m_debugExitParse).undocumented();
DECL_OPTION("-debug-exit-uvm", OnOff, &m_debugExitUvm).undocumented();
DECL_OPTION("-debug-exit-uvm23", OnOff, &m_debugExitUvm23).undocumented();
DECL_OPTION("-debug-fatalsrc", CbCall, []() {
v3fatalSrc("--debug-fatal-src");
}).undocumented(); // See also --debug-abort

View File

@ -236,6 +236,7 @@ private:
bool m_debugEmitV = false; // main switch: --debug-emitv
bool m_debugExitParse = false; // main switch: --debug-exit-parse
bool m_debugExitUvm = false; // main switch: --debug-exit-uvm
bool m_debugExitUvm23 = false; // main switch: --debug-exit-uvm23
bool m_debugLeak = true; // main switch: --debug-leak
bool m_debugNondeterminism = false; // main switch: --debug-nondeterminism
bool m_debugPartition = false; // main switch: --debug-partition
@ -461,6 +462,7 @@ public:
bool debugEmitV() const VL_MT_SAFE { return m_debugEmitV; }
bool debugExitParse() const { return m_debugExitParse; }
bool debugExitUvm() const { return m_debugExitUvm; }
bool debugExitUvm23() const { return m_debugExitUvm23; }
bool debugLeak() const { return m_debugLeak; }
bool debugNondeterminism() const { return m_debugNondeterminism; }
bool debugPartition() const { return m_debugPartition; }

View File

@ -143,16 +143,22 @@ static void process() {
V3Error::abortIfErrors();
if (v3Global.opt.stats()) V3Stats::statsStageAll(v3Global.rootp(), "Link");
if (v3Global.opt.debugExitUvm()) {
if (v3Global.opt.debugExitUvm23()) {
V3Error::abortIfErrors();
if (v3Global.opt.xmlOnly()) V3EmitXml::emitxml();
cout << "--debug-exit-uvm: Exiting after UVM-supported pass\n";
cout << "--debug-exit-uvm23: Exiting after UVM-supported pass\n";
std::exit(0);
}
// Remove parameters by cloning modules to de-parameterized versions
// This requires some width calculations and constant propagation
V3Param::param(v3Global.rootp());
if (v3Global.opt.debugExitUvm()) {
V3Error::abortIfErrors();
if (v3Global.opt.xmlOnly()) V3EmitXml::emitxml();
cout << "--debug-exit-uvm: Exiting after UVM-supported pass\n";
std::exit(0);
}
V3LinkDot::linkDotParamed(v3Global.rootp()); // Cleanup as made new modules
V3LinkLValue::linkLValue(v3Global.rootp()); // Resolve new VarRefs
V3Error::abortIfErrors();