TLM FIFO Classes

This section defines TLM-based FIFO classes.

Contents
TLM FIFO ClassesThis section defines TLM-based FIFO classes.
uvm_tlm_fifoThis class provides storage of transactions between two independently running processes.
uvm_tlm_analysis_fifoAn analysis_fifo is a uvm_tlm_fifo with an unbounded size and a write interface.

uvm_tlm_fifo

This class provides storage of transactions between two independently running processes.  Transactions are put into the FIFO via the put_export. transactions are fetched from the FIFO in the order they arrived via the get_peek_export.  The put_export and get_peek_export are inherited from the uvm_tlm_fifo_base #(T) super class, and the interface methods provided by these exports are defined by the uvm_tlm_if_base #(T1,T2) class.

Summary
uvm_tlm_fifo
This class provides storage of transactions between two independently running processes.
Class Hierarchy
Class Declaration
class uvm_tlm_fifo #(
    type  T  =  int
) extends uvm_tlm_fifo_base #(T)
Methods
newThe name and parent are the normal uvm_component constructor arguments.
sizeReturns the capacity of the FIFO-- that is, the number of entries the FIFO is capable of holding.
usedReturns the number of entries put into the FIFO.
is_emptyReturns 1 when there are no entries in the FIFO, 0 otherwise.
is_fullReturns 1 when the number of entries in the FIFO is equal to its size, 0 otherwise.
flushRemoves all entries from the FIFO, after which used returns 0 and is_empty returns 1.

new

function new( string  name,   
uvm_component  parent  =  null,
int  size  =  1 )

The name and parent are the normal uvm_component constructor arguments.  The parent should be null if the uvm_tlm_fifo is going to be used in a statically elaborated construct (e.g., a module).  The size indicates the maximum size of the FIFO; a value of zero indicates no upper bound.

size

virtual function int size()

Returns the capacity of the FIFO-- that is, the number of entries the FIFO is capable of holding.  A return value of 0 indicates the FIFO capacity has no limit.

used

virtual function int used()

Returns the number of entries put into the FIFO.

is_empty

virtual function bit is_empty()

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

is_full

virtual function bit is_full()

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

flush

virtual function void flush()

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

uvm_tlm_analysis_fifo

An analysis_fifo is a uvm_tlm_fifo with an unbounded size and a write interface.  It can be used any place a uvm_analysis_imp is used.  Typical usage is as a buffer between an uvm_analysis_port in an initiator component and TLM1 target component.

Summary
uvm_tlm_analysis_fifo
An analysis_fifo is a uvm_tlm_fifo with an unbounded size and a write interface.
Class Hierarchy
uvm_tlm_fifo#(T)
uvm_tlm_analysis_fifo
Class Declaration
class uvm_tlm_analysis_fifo #(
    type  T  =  int
) extends uvm_tlm_fifo #(T)
Ports
analysis_export #(T)The analysis_export provides the write method to all connected analysis ports and parent exports:
Methods
newThis is the standard uvm_component constructor.

analysis_export #(T)

The analysis_export provides the write method to all connected analysis ports and parent exports:

function void write (T t)

Access via ports bound to this export is the normal mechanism for writing to an analysis FIFO.  See write method of uvm_tlm_if_base #(T1,T2) for more information.

new

function new( string  name  ,   
uvm_component  parent  =  null )

This is the standard uvm_component constructor.  name is the local name of this component.  The parent should be left unspecified when this component is instantiated in statically elaborated constructs and must be specified when this component is a child of another UVM component.

class uvm_tlm_fifo #( type  T  =  int ) extends uvm_tlm_fifo_base #(T)
This class provides storage of transactions between two independently running processes.
class uvm_tlm_analysis_fifo #( type  T  =  int ) extends uvm_tlm_fifo #(T)
An analysis_fifo is a uvm_tlm_fifo with an unbounded size and a write interface.
The uvm_void class is the base class for all UVM classes.
virtual class uvm_object extends uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
class uvm_report_object extends uvm_object
The uvm_report_object provides an interface to the UVM reporting facility.
virtual class uvm_component extends uvm_report_object
The uvm_component class is the root base class for UVM components.
virtual class uvm_tlm_fifo_base #( type  T  =  int ) extends uvm_component
This class is the base for uvm_tlm_fifo #(T).
function new( string  name,   
uvm_component  parent  =  null,
int  size  =  1 )
The name and parent are the normal uvm_component constructor arguments.
virtual function int size()
Returns the capacity of the FIFO-- that is, the number of entries the FIFO is capable of holding.
virtual function int used()
Returns the number of entries put into the FIFO.
virtual function bit is_empty()
Returns 1 when there are no entries in the FIFO, 0 otherwise.
virtual function bit is_full()
Returns 1 when the number of entries in the FIFO is equal to its size, 0 otherwise.
virtual function void flush()
Removes all entries from the FIFO, after which used returns 0 and is_empty returns 1.
virtual class uvm_tlm_if_base #( type  T1  =  int,
type  T2  =  int )
This class declares all of the methods of the TLM API.
function new( string  name  ,   
uvm_component  parent  =  null )
This is the standard uvm_component constructor.
class uvm_analysis_imp #(
    type  T  =  int,
    type  IMP  =  int
) extends uvm_port_base #(uvm_tlm_if_base #(T,T))
Receives all transactions broadcasted by a uvm_analysis_port.
class uvm_analysis_port # (
    type  T  =  int
) extends uvm_port_base # (uvm_tlm_if_base #(T,T))
Broadcasts a value to all subscribers implementing a uvm_analysis_imp.