what is uvm_top. and in which file it is defined??
uvm_top is simply the top-level component of your UVM hierarchy. It isn’t really defined anywhere and you shouldn’t need it. Just note that every uvm_component is named “uvm_top.”. It’s useful for passing things into the config_db from the top-level module, or if you need to refer to a component by name and you can’t get a relative name for some reason.
In reply to tfitz:
Tom, What is the difference between uvm_test_top and uvm_top? I thought uvm_test_top is the top level component.
In reply to Naven8:
uvm_top is the name of the static class variable inside the uvm_pkg that holds a handle to the uvm_root. as Tom says, you should never need to use this variable. “uvm_test_top” is the top-level instance name given to the test specified by run_test.
In reply to dave_59:
uvm_top is the instance of the UVM_root. uvm_root class serves as the implicit top-level and phase controller for all UVM components.
we can call the Uvm root functions by this instance name :
uvm_top.print_topology();
In reply to 1117ashish:
uvm_test_top is the handle of uvm_component. although uvm_component is a vuirtual class so it cannot be constructed. while uvm_top is the instance name of uvm_root. So when run_test is occur the instance of uvm_root is created. and we called it as uvm_top.