uvm_tlm_if_base #(T1,T2)

This class declares all of the methods of the TLM API.

Various subsets of these methods are combined to form primitive TLM interfaces, which are then paired in various ways to form more abstract “combination” TLM interfaces.  Components that require a particular interface use ports to convey that requirement.  Components that provide a particular interface use exports to convey its availability.

Communication between components is established by connecting ports to compatible exports, much like connecting module signal-level output ports to compatible input ports.  The difference is that UVM ports and exports bind interfaces (groups of methods), not signals and wires.  The methods of the interfaces so bound pass data as whole transactions (e.g. objects).  The set of primitve and combination TLM interfaces afford many choices for designing components that communicate at the transaction level.

Summary
uvm_tlm_if_base #(T1,T2)
This class declares all of the methods of the TLM API.
Class Declaration
virtual class uvm_tlm_if_base #( type  T1  =  int,
type  T2  =  int )
Blocking put
putSends a user-defined transaction of type T.
Blocking get
getProvides a new transaction of type T.
Blocking peek
peekObtain a new transaction without consuming it.
Non-blocking put
try_putSends a transaction of type T, if possible.
can_putReturns 1 if the component is ready to accept the transaction; 0 otherwise.
Non-blocking get
try_getProvides a new transaction of type T.
can_getReturns 1 if a new transaction can be provided immediately upon request, 0 otherwise.
Non-blocking peek
try_peekProvides a new transaction without consuming it.
can_peekReturns 1 if a new transaction is available; 0 otherwise.
Blocking transport
transportExecutes the given request and returns the response in the given output argument.
Non-blocking transport
nb_transportExecutes the given request and returns the response in the given output argument.
Analysis
writeBroadcasts a user-defined transaction of type T to any number of listeners.

put

virtual task put( input  T1  t )

Sends a user-defined transaction of type T.

Components implementing the put method will block the calling thread if it cannot immediately accept delivery of the transaction.

get

virtual task get( output  T2  t )

Provides a new transaction of type T.

The calling thread is blocked if the requested transaction cannot be provided immediately.  The new transaction is returned in the provided output argument.

The implementation of get must regard the transaction as consumed.  Subsequent calls to get must return a different transaction instance.

peek

virtual task peek( output  T2  t )

Obtain a new transaction without consuming it.

If a transaction is available, then it is written to the provided output argument.  If a transaction is not available, then the calling thread is blocked until one is available.

The returned transaction is not consumed.  A subsequent peek or get will return the same transaction.

try_put

virtual function bit try_put( input  T1  t )

Sends a transaction of type T, if possible.

If the component is ready to accept the transaction argument, then it does so and returns 1, otherwise it returns 0.

can_put

virtual function bit can_put()

Returns 1 if the component is ready to accept the transaction; 0 otherwise.

try_get

virtual function bit try_get( output  T2  t )

Provides a new transaction of type T.

If a transaction is immediately available, then it is written to the output argument and 1 is returned.  Otherwise, the output argument is not modified and 0 is returned.

can_get

virtual function bit can_get()

Returns 1 if a new transaction can be provided immediately upon request, 0 otherwise.

try_peek

virtual function bit try_peek( output  T2  t )

Provides a new transaction without consuming it.

If available, a transaction is written to the output argument and 1 is returned.  A subsequent peek or get will return the same transaction.  If a transaction is not available, then the argument is unmodified and 0 is returned.

can_peek

virtual function bit can_peek()

Returns 1 if a new transaction is available; 0 otherwise.

transport

virtual task transport( input T1  req  ,
output  T2  rsp )

Executes the given request and returns the response in the given output argument.  The calling thread may block until the operation is complete.

nb_transport

virtual function bit nb_transport( input  T1  req,
output  T2  rsp )

Executes the given request and returns the response in the given output argument.  Completion of this operation must occur without blocking.

If for any reason the operation could not be executed immediately, then a 0 must be returned; otherwise 1.

write

virtual function void write( input  T1  t )

Broadcasts a user-defined transaction of type T to any number of listeners.  The operation must complete without blocking.

virtual class uvm_tlm_if_base #( type  T1  =  int,
type  T2  =  int )
This class declares all of the methods of the TLM API.
virtual task put( input  T1  t )
Sends a user-defined transaction of type T.
virtual task get( output  T2  t )
Provides a new transaction of type T.
virtual task peek( output  T2  t )
Obtain a new transaction without consuming it.
virtual function bit try_put( input  T1  t )
Sends a transaction of type T, if possible.
virtual function bit can_put()
Returns 1 if the component is ready to accept the transaction; 0 otherwise.
virtual function bit try_get( output  T2  t )
Provides a new transaction of type T.
virtual function bit can_get()
Returns 1 if a new transaction can be provided immediately upon request, 0 otherwise.
virtual function bit try_peek( output  T2  t )
Provides a new transaction without consuming it.
virtual function bit can_peek()
Returns 1 if a new transaction is available; 0 otherwise.
virtual task transport( input T1  req  ,
output  T2  rsp )
Executes the given request and returns the response in the given output argument.
virtual function bit nb_transport( input  T1  req,
output  T2  rsp )
Executes the given request and returns the response in the given output argument.
virtual function void write( input  T1  t )
Broadcasts a user-defined transaction of type T to any number of listeners.