FIFO¶
Title: TLM FIFO Classes
This section defines TLM-based FIFO classes.
- class uvm.tlm1.uvm_tlm_fifos.UVMTLMFIFO(name, parent=None, size=1)[source]¶
Bases:
UVMTLMFIFOBase
Class: UVMTLMFIFO
This class provides storage of transactions between two independently running processes. Transactions are put into the FIFO via the
UVMTLMFIFOBase.put_export
. transactions are fetched from the FIFO in the order they arrived via theget_peek_export
. TheUVMTLMFIFOBase.put_export
andUVMTLMFIFOBase.get_peek_export
are inherited from theUVMTLMFIFOBase
super class, and the interface methods provided by these exports are defined by theTLMIFBaseClass
class.- type_name = 'uvm_tlm_fifo #(T)'¶
- 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
- size()[source]¶
Returns the capacity of the FIFO, the number of entries the FIFO is capable of holding. A return value of 0 indicates the FIFO capacity has no limit.
- Returns
Capacity of the FIFO
- Return type
- used()[source]¶
Function: used
Returns the number of entries put into the FIFO.
- Returns
Number of entries in the FIFO.
- Return type
- is_full()[source]¶
Returns 1 when the number of entries in the FIFO is equal to its <size>, 0 otherwise.
Returns:
- flush() None [source]¶
Removes all entries from the FIFO, after which
used
returns 0 andis_empty
returns 1.
- m_children_by_handle: Dict['UVMComponent', 'UVMComponent']¶
- m_children_ordered: List['UVMComponent']¶
- event_pool: UVMEventPool¶
- class uvm.tlm1.uvm_tlm_fifos.UVMTLMAnalysisFIFO(name, parent=None)[source]¶
Bases:
UVMTLMFIFO
Class: UVMTLMAnalysisFIFO
An analysis_fifo is a
UVMTLMFIFO
with an unbounded size and a write interface. It can be used any place aUVMAnalysisImp
is used. Typical usage is as a buffer between a <uvm_analysis_port> in an initiator component and TLM1 target component.- type_name = 'uvm_tlm_analysis_fifo #(T)'¶
- 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¶