The UVM test runner is responsible for the execution of the UVM test.
The UVM core service is responsible for instantiating the test runner. The test runner is responsible for executing the test.
@uvm-contrib For potential contribution to the 1800.2 standard
| uvm_test_runner | |||
| The UVM test runner is responsible for the execution of the UVM test. | |||
| Class Hierarchy | |||
| |||
| Class Declaration | |||
| |||
| new | Creates a new uvm_test_runner instance with name. | ||
| Singleton Accessors | |||
| get_global_runner | Returns the global test runner. | ||
| Test Execution | |||
| get_uvm_testname | Returns the name of the test that was specified, if any. | ||
| run_test | Executes the test. | ||
| die | This method is called by the report server if a report reaches the maximum quit count or has a UVM_EXIT action associated with it, e.g., as with fatal errors. | ||
function new( string name = "uvm_test_runner" )
Creates a new uvm_test_runner instance with name.
@uvm-contrib For potential contribution to the 1800.2 standard
static function uvm_test_runner get_global_runner()
Returns the global test runner.
@uvm-contrib For potential contribution to the 1800.2 standard
virtual function string get_uvm_testname()
Returns the name of the test that was specified, if any.
Calling this method before run_test has been called will result in a fatal error.
@uvm-contrib For potential contribution to the 1800.2 standard
virtual task run_test( string test_name = "" )
Executes the test.
a) The UVM core state is set to `UVM_CORE_PRE_RUN` via <set_core_state>. b) If the command-line plusarg `+UVM_TESTNAME=<TEST_NAME>` is found, then the implementation shall call <create_component_by_name> on the current factory with requested_type_name set to the plusarg defined <TEST_NAME> and name set to `uvm_test_top`. c) If test_name is not an empty string (“”) and no name was provided via the command-line plusarg, then the implementation shall call <create_component_by_name> on the current factory with requested_type_name set to test_name and name set to `uvm_test_top`. d) If no components other than uvm_root have been created at this point, either by run_test or by the user, then the implementation shall generate a fatal message and run_test shall return immediately. e) The UVM core state is set to `UVM_CORE_RUNNING` via <set_core_state>. f) All components are phased through all registered phases (see <uvm_phase_hopper>). g) The UVM core state is set to `UVM_CORE_POST_RUN` via <set_core_state>. h) The <uvm_report_server::report_summarize> method is called on the current report server. i) The UVM core state is set to `UVM_CORE_FINISHED` via <set_core_state>. j) If <uvm_root::get_finish_on_completion> returns `1`, then `$finish` is called; otherwise, run_test shall return.
@uvm-contrib For potential contribution to the 1800.2 standard
virtual function void die()
This method is called by the report server if a report reaches the maximum quit count or has a UVM_EXIT action associated with it, e.g., as with fatal errors.
If the UVM core state is already `UVM_CORE_PRE_ABORT` or `UVM_CORE_ABORTED`, then the method shall return immediately.
a) The UVM core state is set to `UVM_CORE_PRE_ABORT` via <set_core_state>. b) The <uvm_component::pre_abort> method is called on the entire uvm_component hierarchy in a bottom-up fashion. c) The <uvm_report_server::report_summarize> method is called on the current report server. d) The UVM core state is set to `UVM_CORE_ABORTED` via <set_core_state>. e) The simulation is terminated with $finish.
@uvm-contrib For potential contribution to the 1800.2 standard
The UVM test runner is responsible for the execution of the UVM test.
class uvm_test_runner extends uvm_object
Creates a new uvm_test_runner instance with name.
function new( string name = "uvm_test_runner" )
Returns the global test runner.
static function uvm_test_runner get_global_runner()
Returns the name of the test that was specified, if any.
virtual function string get_uvm_testname()
Executes the test.
virtual task run_test( string test_name = "" )
This method is called by the report server if a report reaches the maximum quit count or has a UVM_EXIT action associated with it, e.g., as with fatal errors.
virtual function void die()
Implementation of the uvm_root class, as defined in 1800.2-2020 Section F.7 with the following additional API
class uvm_root extends uvm_component