What Are UVM Phases
What Are UVM Phases
-> UVM Phases are predefined virtual function / tasks defined in UVM component
-> These pre-defined virtual methods give each class (extended from UVM component) in the
-> This allows the entire TB components to be created, connected, and their functionality executed
in synchronization.
-> In simpler terms, the test, environment, agent, driver, monitor, sequencer, scoreboard,
and subscriber i.e each component will have common understanding when to be created,
when to make connections with each other, and when to start executing the functionality
written in the run phase and when to stop and complete the simulation in well defined order.
Run phase - Actual simulation happens, Driver drives the data to dut and
Extract - retrives and processes the information from the SB and coverage model
-> Basically, all the components in the TB need to work as a team for the TB to work in perfect sync.
Phases helps in fulfilling this objective.
-> The UVM TB follows a pre-defined sequence of UVM_PHASES and having said that;
the TB will only move on to the next phase if all the TB components are done with executing their
-> Yes, UVM waits for all the quicker & slower ones…
final phase
Extract phase
Check phase
Report phase
-> Generally when we are building a testbench in uvm if we look at the hierarchy we will find
at the top there is something called as tb_top or top module which is the static part of
the testbench.
-> So when run_test is called from the top module it initiates uvm phasing mechanism which in
turn called uvm_test and it executes the build phase of the test class.
The build phase of test in turn called the environment and then environment is going to call
-> Basically the child class can not inherit the properties or it can not be built until the
upper level components in the hierarchy wouldn’t get created.
-> The build phase has to be constructed first so that the top level components has to be built
To start a UVM Testbench, the run_test() method has to be called from the static part of the
Testbench
i.e called from an initial block in the top module of the Testbench.
Once the run_test() method is called, it constructs the root component of the UVM
environment
1. stimulus generation
4. Generation of testcases
5. shutdown
-> phase
the run phase is a task and all other phases are function
Why are phases introduced for UVM based SV TB but not for Verilog-based TB?
- All components are static in Verilog-based TB whereas SV introduced OOP feature in the TB.
- In Verilog, as modules are static, users don’t have to care about their creation as they would
- In the case of UVM based SV TB, class objects can be created at any time during the simulation
before they are created, The UVM phasing mechanism serves the purpose of synchronization.