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 the get_peek_export. The UVMTLMFIFOBase.put_export and UVMTLMFIFOBase.get_peek_export are inherited from the UVMTLMFIFOBase super class, and the interface methods provided by these exports are defined by the TLMIFBaseClass 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

str

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

int

used()[source]

Function: used

Returns the number of entries put into the FIFO.

Returns

Number of entries in the FIFO.

Return type

int

is_empty()[source]

Returns 1 when there are no entries in the FIFO, 0 otherwise.

Returns:

is_full()[source]

Returns 1 when the number of entries in the FIFO is equal to its <size>, 0 otherwise.

Returns:

async put(t) None[source]
async get(t=None) Any[source]
async peek(t=None) Any[source]
try_get(t) bool[source]
try_peek(t) bool[source]
try_put(t) bool[source]
can_put() bool[source]
can_get() bool[source]
can_peek() bool[source]
flush() None[source]

Removes all entries from the FIFO, after which used returns 0 and is_empty returns 1.

m_children: Dict[str, 'UVMComponent']
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 a UVMAnalysisImp 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

str

write(t) None[source]
m_children: Dict[str, 'UVMComponent']
m_children_by_handle: Dict['UVMComponent', 'UVMComponent']
m_children_ordered: List['UVMComponent']
event_pool: UVMEventPool