Thursday, October 10, 2019

How class based uvm test top connected in module

When import the uvm package in module, the task run_test(string testname="") will be visible as global task from the file uvm_globals.svh  
This task is a Convenience function for uvm_top.run_test() , it calls uvm_root class run_test which creates the test class object and manages/spawns uvm phases.

UVM_ROOT:

The ~uvm_root~ class serves as the implicit top-level and phase controller for
all UVM components. Users do not directly instantiate ~uvm_root~. The UVM
automatically creates a single instance of <uvm_root> that users can
access via the global (uvm_pkg-scope) variable, ~uvm_top~.