TLM Ports in UVM
TLM Ports in UVM
TLM Ports in UVM
TLM PORTS
Introduction
It is necessary to manage most of the verification tasks, such as generating stimulus and
collecting coverage data, at the transaction level, which is the natural way verification
engineers tend to think of the activity of a system. UVM provides a set of transaction-level
communication interfaces and channels that you can use to connect components at the
transaction level.
TLM models are at a higher level of abstraction, and more closely match the level of
abstraction at which the verification engineers or design engineers think about the intended
functionality. This makes it easier to write the models and easier for other engineers to
understand them.
A connection between the TLM port and the export establishes a mechanism of communication
between the two components.
uvm_blocking_put_port
Yaswanth B
2
Producer:
Consumer:
Connection:
Yaswanth B
3
In above mentioned example a producer can communicate with a consumer using a simple
TLM port. The producer can create a transaction and “put” to the TLM port, while the
implementation of the “put” method which is also called TLM export would be in the
consumer that reads the transaction created by the producer, thus establishing a channel of
communication while connect in class env in function connect().
Uvm_blocking_get_port
Export port
Declaration: Declaration:
uvm_blocking_get_imp #(t,imp) get_export; uvm_blocking_get_port #(T) get_port;
Method defined:ed: Method defined:ed:
task get(T); .get(T);
Connection:
IMP -> class name where
c.get_port.connect(p.get_export);
implementation is
declared.
Here is “Producer”
Producer:
Yaswanth B
4
Consumer:
Connection:
In above mentioned example a consumer can communicate with a producer using a simple
TLM port. The consumer can create a transaction and “get” to the TLM port, while the
implementation of the “get” method which is also called TLM export would be in the
producer that reads the transaction created by the consumer, thus establishing a channel of
communication while connect in class env in function connect().
Yaswanth B
5
1. Unidirectional Ports:
1. uvm_*_put_**
2. uvm_*_get_**
3. uvm_*_peek_**
4. uvm_*_get_peek_**
2. Bidirectional Ports:
1. uvm_*_master_**
2. uvm_*_slave_**
3. uvm_*_transport_**
3. Analysis Port
1. uvm_analysis_**
TLM_FIFO:
Yaswanth B
6
A TLM FIFO is used for Transactional communication if both the producing component and
the consuming component need to operate independently. In this case (as shown above), the
producing component generates transactions and “puts” into FIFO, while the consuming
component gets one transaction at a time from the FIFO and processes it.
uvm_analysis_port
We can say like normal put_port/get_port: One-to-one connection means one component
puts the transaction and only one component gets the transaction.
Yaswanth B
7
Hierarchical Connections:
When there is a need to connect ports/exports of the child class to the parent class then it can
be connected as shown in the below figure:
Yaswanth B