pyuvm._s13_predefined_component_classes
Module Contents
Classes
The base class for all tests |
|
The base class for hierarchical containers of other components that together comprise a complete environment. The environment may initially consist of the entire testbench. Later, it can be reused as a sub-environment in even larger system-level environments. |
|
The :class: |
|
This class should be used as the base class for user-defined monitors. |
|
This class should be used as the base class for user-defined scoreboards. |
|
The base class for drivers that initiate requests for new transactions via
a :class: |
|
This class provides an analysis export for receiving transactions from a connected analysis export. Making such a connection “subscribes” this component to any transactions emitted by the connected analysis port. |
API
- class pyuvm._s13_predefined_component_classes.uvm_active_passive_enum
Bases:
enum.IntEnum- UVM_PASSIVE
0
- UVM_ACTIVE
1
- class pyuvm._s13_predefined_component_classes.uvm_test(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThe base class for all tests
Initialization
13.1.2.1—This is new() in the IEEE-UVM, but we mean the same thing with init()
:param name: The name of the component. Used in the UVM hierarchy :param parent: The parent component. If None, the parent is uvm_root
- class pyuvm._s13_predefined_component_classes.uvm_env(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThe base class for hierarchical containers of other components that together comprise a complete environment. The environment may initially consist of the entire testbench. Later, it can be reused as a sub-environment in even larger system-level environments.
Initialization
13.1.2.1—This is new() in the IEEE-UVM, but we mean the same thing with init()
:param name: The name of the component. Used in the UVM hierarchy :param parent: The parent component. If None, the parent is uvm_root
- class pyuvm._s13_predefined_component_classes.uvm_agent(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThe :class:
!uvm_agentvirtual class should be used as the base class for the user-defined agents. Deriving from :class:!uvm_agentwill allow you to distinguish agents from other component types also using its inheritance. Such agents will automatically inherit features that may be added to :class:!uvm_agentin the future.While an agent’s build function, inherited from :class:
~uvm_component, can be implemented to define any agent topology, an agent typically contains three subcomponents: a driver, sequencer, and monitor. If the agent is active, subtypes should contain all three subcomponents. If the agent is passive, subtypes should contain only the monitor.Initialization
13.1.2.1—This is new() in the IEEE-UVM, but we mean the same thing with init()
:param name: The name of the component. Used in the UVM hierarchy :param parent: The parent component. If None, the parent is uvm_root
- build_phase()
This
build_phase()implements agent-specific behavior. * It sets the agent’sis_activeproperty toUVM_ACTIVE* It allows the user to override theis_activeproperty using thecdb_get()method. * It logs a warning if the user sets an illegal value foris_activeand sets the value toUVM_ACTIVE.
- get_is_active()
Returns :data:
~uvm_active_passive_enum.UVM_ACTIVEif the agent is acting as an active agent and :data:~uvm_active_passive_enum.UVM_PASSIVEif it is acting as a passive agent. The default implementation is to just return theis_activeflag, but the component developer may override this behavior if a more complex algorithm is needed to determine the active/passive nature of the agent.
- active()
- class pyuvm._s13_predefined_component_classes.uvm_monitor(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThis class should be used as the base class for user-defined monitors.
Deriving from :class:
!uvm_monitorallows you to distinguish monitors from generic component types inheriting from :class:~uvm_component. Such monitors will automatically inherit features that may be added to :class:!uvm_monitorin the future.Initialization
13.1.2.1—This is new() in the IEEE-UVM, but we mean the same thing with init()
:param name: The name of the component. Used in the UVM hierarchy :param parent: The parent component. If None, the parent is uvm_root
- class pyuvm._s13_predefined_component_classes.uvm_scoreboard(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThis class should be used as the base class for user-defined scoreboards.
Deriving from :class:
!uvm_scoreboardwill allow you to distinguish scoreboards from other component types inheriting directly from :class:~uvm_component. Such scoreboards will automatically inherit and benefit from features that may be added to :class:!uvm_scoreboardin the future.Initialization
13.1.2.1—This is new() in the IEEE-UVM, but we mean the same thing with init()
:param name: The name of the component. Used in the UVM hierarchy :param parent: The parent component. If None, the parent is uvm_root
- class pyuvm._s13_predefined_component_classes.uvm_driver(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThe base class for drivers that initiate requests for new transactions via a :class:
~uvm_seq_item_pull_port. The ports are typically connected to the exports of an appropriate sequencer component.This driver operates in pull mode. Its ports are typically connected to the corresponding exports in a pull sequencer as follows:
.. code-block:: python
driver.seq_item_port.connect(sequencer.seq_item_export) driver.rsp_port.connect(sequencer.rsp_export)
The
rsp_portneeds connecting only if the driver will use it to write responses to the analysis export in the sequencer.Initialization
Creates and initializes an instance of this class using the normal constructor arguments for :class:
~uvm_component: name is the name of the instance, and parent is the handle to the hierarchical parent, if any.
- class pyuvm._s13_predefined_component_classes.uvm_subscriber(name, parent)
Bases:
pyuvm._s13_uvm_component.uvm_componentThis class provides an analysis export for receiving transactions from a connected analysis export. Making such a connection “subscribes” this component to any transactions emitted by the connected analysis port.
Subtypes of this class must define the write method to process the incoming transactions. This class is particularly useful when designing a coverage collector that attaches to a monitor.
Initialization
13.1.2.1—This is new() in the IEEE-UVM, but we mean the same thing with init()
:param name: The name of the component. Used in the UVM hierarchy :param parent: The parent component. If None, the parent is uvm_root
- class uvm_AnalysisImp(name, parent, write_fn)
Bases:
pyuvm._s12_uvm_tlm_interfaces.uvm_analysis_export- write(tt)
Write a transaction to all the connected subscribers.
:param tt: The transaction to write :return: None
- write(tt)
Method that must be defined in each subclass. Access to this method by outside components should be done via the :any:
analysis_export.