uvm_driver¶
- class uvm.comps.uvm_driver.UVMDriver(name, parent)[source]¶
Bases:
UVMComponent
The base class for drivers that initiate requests for new transactions via a
UVMSeqItemPullPort
. 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:
driver.seq_item_port.connect(sequencer.seq_item_export); driver.rsp_port.connect(sequencer.rsp_export);
The
UVMDriver.rsp_port
needs connecting only if the driver will use it to write responses to the analysis export in the sequencer.- Variables
seq_item_port (UVMSeqItemPullPort) – Derived driver classes should use this port to request items from the sequencer. They may also use it to send responses back.
rst_port (UVMAnalysisPort) – This port provides an alternate way of sending responses back to the originating sequencer. Which port to use depends on which export the sequencer provides for connection.
- type_name = 'uvm_driver #(REQ,RSP)'¶
- 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_children_by_handle: Dict['UVMComponent', 'UVMComponent']¶
- m_children_ordered: List['UVMComponent']¶
- event_pool: UVMEventPool¶