UVM Run-Time Phases¶
Title: UVM Run-Time Phases
The run-time schedule is the pre-defined phase schedule
which runs concurrently to the UVMRunPhase
global run phase.
By default, all `UVMComponent`s using the run-time schedule
are synchronized with respect to the pre-defined phases in the schedule.
It is possible for components to belong to different domains
in which case their schedules can be unsynchronized.
The names of the UVM phases (which will be returned by get_name() for a phase instance) match the class names specified below with the “uvm_” and “_phase” removed. For example, the main phase corresponds to the UVMMainPhase class below and has the name “main”, which means that the following can be used to call foo() at the start of main phase:
def phase_started(self, phase):
if phase.get_name()=="main":
self.foo()
The run-time phases are executed in the sequence they are specified below.
- class uvm.base.uvm_runtime_phases.UVMPreResetPhase(name='pre_reset')[source]¶
Bases:
UVMTaskPhase
Class: UVMPreResetPhase
Before reset is asserted.
UVMTaskPhase
that calls theUVMComponent.pre_reset_phase
method. This phase starts at the same time as theUVMRunPhase
unless a user defined phase is inserted in front of this phase.Upon Entry: - Indicates that power has been applied but not necessarily valid or stable. - There should not have been any active clock edges
before entry into this phase.
Typical Uses: - Wait for power good. - Components connected to virtual interfaces should initialize
their output to X’s or Z’s.
Initialize the clock signals to a valid value
Assign reset signals to X (power-on reset).
Wait for reset signal to be asserted if not driven by the verification environment.
Exit Criteria: - Reset signal, if driven by the verification environment,
is ready to be asserted.
Reset signal, if not driven by the verification environment, is asserted.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPreResetPhase object>¶
- type_name = 'uvm_pre_reset_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMResetPhase(name='reset')[source]¶
Bases:
UVMTaskPhase
Class: UVMResetPhase
Reset is asserted.
UVMTaskPhase
that calls theUVMComponent.reset_phase
method.Upon Entry: - Indicates that the hardware reset signal is ready to be asserted.
Typical Uses: - Assert reset signals. - Components connected to virtual interfaces should drive their output
to their specified reset or idle value.
Components and environments should initialize their state variables.
Clock generators start generating active edges.
De-assert the reset signal(s) just before exit.
Wait for the reset signal(s) to be de-asserted.
Exit Criteria: - Reset signal has just been de-asserted. - Main or base clock is working and stable. - At least one active clock edge has occurred. - Output signals and state variables have been initialized.
- m_inst = <uvm.base.uvm_runtime_phases.UVMResetPhase object>¶
- type_name = 'uvm_reset_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPostResetPhase(name='post_reset')[source]¶
Bases:
UVMTaskPhase
Class: uvm_post_reset_phase
After reset is de-asserted.
UVMTaskPhase
that calls theUVMComponent.post_reset_phase
method.Upon Entry: - Indicates that the DUT reset signal has been de-asserted.
Typical Uses: - Components should start behavior appropriate for reset being inactive.
For example, components may start to transmit idle transactions or interface training and rate negotiation. This behavior typically continues beyond the end of this phase.
Exit Criteria: - The testbench and the DUT are in a known, active state.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPostResetPhase object>¶
- type_name = 'uvm_post_reset_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPreConfigurePhase(name='pre_configure')[source]¶
Bases:
UVMTaskPhase
Class: UVMPreConfigurePhase
Before the DUT is configured by the SW.
UVMTaskPhase
that calls theUVMComponent.pre_configure_phase
method.Upon Entry: - Indicates that the DUT has been completed reset
and is ready to be configured.
Typical Uses: - Procedurally modify the DUT configuration information as described
in the environment (and that will be eventually uploaded into the DUT).
Wait for components required for DUT configuration to complete training and rate negotiation.
Exit Criteria: - DUT configuration information is defined.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPreConfigurePhase object>¶
- type_name = 'uvm_pre_configure_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMConfigurePhase(name='configure')[source]¶
Bases:
UVMTaskPhase
Class: UVMConfigurePhase
The SW configures the DUT.
UVMTaskPhase
that calls theUVMComponent.configure_phase
method.Upon Entry: - Indicates that the DUT is ready to be configured.
Typical Uses: - Components required for DUT configuration execute transactions normally. - Set signals and program the DUT and memories
(e.g. read/write operations and sequences) to match the desired configuration for the test and environment.
Exit Criteria: - The DUT has been configured and is ready to operate normally.
- m_inst = <uvm.base.uvm_runtime_phases.UVMConfigurePhase object>¶
- type_name = 'uvm_configure_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPostConfigurePhase(name='post_configure')[source]¶
Bases:
UVMTaskPhase
Class: UVMPostConfigurePhase
After the SW has configured the DUT.
UVMTaskPhase
that calls theUVMComponent.post_configure_phase
method.Upon Entry: - Indicates that the configuration information has been fully uploaded.
Typical Uses: - Wait for configuration information to fully propagate and take effect. - Wait for components to complete training and rate negotiation. - Enable the DUT. - Sample DUT configuration coverage.
Exit Criteria: - The DUT has been fully configured and enabled
and is ready to start operating normally.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPostConfigurePhase object>¶
- type_name = 'uvm_post_configure_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPreMainPhase(name='pre_main')[source]¶
Bases:
UVMTaskPhase
Class: UVMPreMainPhase
Before the primary test stimulus starts.
UVMTaskPhase
that calls theUVMComponent.pre_main_phase
method.Upon Entry: - Indicates that the DUT has been fully configured.
Typical Uses: - Wait for components to complete training and rate negotiation.
Exit Criteria: - All components have completed training and rate negotiation. - All components are ready to generate and/or observe normal stimulus.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPreMainPhase object>¶
- type_name = 'uvm_pre_main_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMMainPhase(name='main')[source]¶
Bases:
UVMTaskPhase
Class: UVMMainPhase
Primary test stimulus.
UVMTaskPhase
that calls theUVMComponent.main_phase
method.Upon Entry: - The stimulus associated with the test objectives is ready to be applied.
Typical Uses: - Components execute transactions normally. - Data stimulus sequences are started. - Wait for a time-out or certain amount of time,
or completion of stimulus sequences.
Exit Criteria: - Enough stimulus has been applied to meet the primary
stimulus objective of the test.
- m_inst = <uvm.base.uvm_runtime_phases.UVMMainPhase object>¶
- type_name = 'UVMMainPhase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPostMainPhase(name='post_main')[source]¶
Bases:
UVMTaskPhase
Class: UVMPostMainPhase
After enough of the primary test stimulus.
UVMTaskPhase
that calls theUVMComponent.post_main_phase
method.Upon Entry: - The primary stimulus objective of the test has been met.
Typical Uses: - Included for symmetry.
Exit Criteria: - None.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPostMainPhase object>¶
- type_name = 'uvm_post_main_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPreShutdownPhase(name='pre_shutdown')[source]¶
Bases:
UVMTaskPhase
Class: UVMPreShutdownPhase
Before things settle down.
UVMTaskPhase
that calls theUVMComponent.pre_shutdown_phase
method.Upon Entry: - None.
Typical Uses: - Included for symmetry.
Exit Criteria: - None.
- m_inst = <uvm.base.uvm_runtime_phases.UVMPreShutdownPhase object>¶
- type_name = 'uvm_pre_shutdown_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMShutdownPhase(name='shutdown')[source]¶
Bases:
UVMTaskPhase
Class: uvm_shutdown_phase
Letting things settle down.
UVMTaskPhase
that calls theUVMComponent.shutdown_phase
method.Upon Entry: - None.
Typical Uses: - Wait for all data to be drained out of the DUT. - Extract data still buffered in the DUT,
usually through read/write operations or sequences.
Exit Criteria: - All data has been drained or extracted from the DUT. - All interfaces are idle.
- m_inst = <uvm.base.uvm_runtime_phases.UVMShutdownPhase object>¶
- type_name = 'uvm_shutdown_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶
- class uvm.base.uvm_runtime_phases.UVMPostShutdownPhase(name='post_shutdown')[source]¶
Bases:
UVMTaskPhase
Class: UVMPostShutdownPhase
After things have settled down.
UVMTaskPhase
that calls theUVMComponent.post_shutdown_phase
method. The end of this phase is synchronized to the end of theUVMRunPhase
phase unless a user defined phase is added after this phase.Upon Entry: - No more “data” stimulus is applied to the DUT.
Typical Uses: - Perform final checks that require run-time access to the DUT
(e.g. read accounting registers or dump the content of memories).
Exit Criteria: - All run-time checks have been satisfied. - The
UVMRunPhase
phase is ready to end.- m_inst = <uvm.base.uvm_runtime_phases.UVMPostShutdownPhase object>¶
- type_name = 'uvm_post_shutdown_phase'¶
- get_type_name()[source]¶
This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.
This function must be defined in every derived class.
A typical implementation is as follows:
class mytype (UVMObject): ... type_name = "mytype" def get_type_name(self): return my_type.type_name
We define the
type_name
static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.- Returns
Type name of the object.
- Return type
- m_sync: List['UVMPhase']¶