From d2fac4aa2f6475ce7309d268d7d56c4c507d054a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 23 Aug 2020 09:05:18 -0400 Subject: [PATCH] Internals: Add --debug-exit-uvm --- src/V3Options.cpp | 2 ++ src/V3Options.h | 2 ++ src/Verilator.cpp | 4 ++++ test_regress/t/t_mailbox_parse.pl | 2 +- test_regress/t/t_process_parse.pl | 2 +- test_regress/t/t_semaphore_parse.pl | 2 +- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 109c788cb..17a63b000 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -1015,6 +1015,8 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char m_debugCollision = flag; } else if (onoff(sw, "-debug-exit-parse", flag /*ref*/)) { // Undocumented m_debugExitParse = flag; + } else if (onoff(sw, "-debug-exit-uvm", flag /*ref*/)) { // Undocumented + m_debugExitUvm = flag; } else if (onoff(sw, "-debug-leak", flag /*ref*/)) { m_debugLeak = flag; } else if (onoff(sw, "-debug-nondeterminism", flag /*ref*/)) { diff --git a/src/V3Options.h b/src/V3Options.h index 1f6cb9ea5..d8a0f17b7 100644 --- a/src/V3Options.h +++ b/src/V3Options.h @@ -266,6 +266,7 @@ private: bool m_debugCheck = false; // main switch: --debug-check bool m_debugCollision = false; // main switch: --debug-collision bool m_debugExitParse = false; // main switch: --debug-exit-parse + bool m_debugExitUvm = false; // main switch: --debug-exit-uvm bool m_debugLeak = true; // main switch: --debug-leak bool m_debugNondeterminism = false; // main switch: --debug-nondeterminism bool m_debugPartition = false; // main switch: --debug-partition @@ -469,6 +470,7 @@ public: bool debugCheck() const { return m_debugCheck; } bool debugCollision() const { return m_debugCollision; } bool debugExitParse() const { return m_debugExitParse; } + bool debugExitUvm() const { return m_debugExitUvm; } bool debugLeak() const { return m_debugLeak; } bool debugNondeterminism() const { return m_debugNondeterminism; } bool debugPartition() const { return m_debugPartition; } diff --git a/src/Verilator.cpp b/src/Verilator.cpp index 570f29ff1..0c12358ec 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -116,6 +116,10 @@ static void process() { cout << "--debug-exit-parse: Exiting after parse\n"; exit(0); } + if (v3Global.opt.debugExitUvm()) { + cout << "--debug-exit-uvm: Exiting after UVM-supported pass\n"; + exit(0); + } // Convert parseref's to varrefs, and other directly post parsing fixups V3LinkParse::linkParse(v3Global.rootp()); diff --git a/test_regress/t/t_mailbox_parse.pl b/test_regress/t/t_mailbox_parse.pl index 99f2d36c4..6074d4d9a 100755 --- a/test_regress/t/t_mailbox_parse.pl +++ b/test_regress/t/t_mailbox_parse.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t_mailbox.v"); lint( - verilator_flags2 => ["--debug-exit-parse"], + verilator_flags2 => ["--debug-exit-uvm"], ); ok(1); diff --git a/test_regress/t/t_process_parse.pl b/test_regress/t/t_process_parse.pl index b06c6fba8..71e0db056 100755 --- a/test_regress/t/t_process_parse.pl +++ b/test_regress/t/t_process_parse.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t_process.v"); lint( - verilator_flags2 => ["--debug-exit-parse"], + verilator_flags2 => ["--debug-exit-uvm"], ); ok(1); diff --git a/test_regress/t/t_semaphore_parse.pl b/test_regress/t/t_semaphore_parse.pl index abc1f79f3..8149e4600 100755 --- a/test_regress/t/t_semaphore_parse.pl +++ b/test_regress/t/t_semaphore_parse.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t_semaphore.v"); lint( - verilator_flags2 => ["--debug-exit-parse"], + verilator_flags2 => ["--debug-exit-uvm"], ); ok(1);