Uvm Topics
Uvm Topics
UVM PHASES :-
• Build Phase is from Top to Bottom approach.
`uvm_do_with :
• `uvm_do_with(req,Constraint) it replaces 3 steps of handshaking (start_item(req),
randomize() and finish_item()) along with that here we will add inline constraint.
`uvm_do_on_with :
• `uvm_do_on_with(req, sequencer, constraint) it replaces 3 steps of handshaking
( start_item(req), randomize() and finish_item() )
`uvm_send :
• `uvm_send(req) it replaces 3 steps of handshaking (finish_item())
• Explicitily we need to create object, start item and randomize();
• Uvm send will only send the randomized data to the driver.
Handshake between sequence and Driver
Start _item
UVM TLM
TLM (Transaction Level Modelling)
• It is a transaction-level modeling
• Where we can send data/transactions from
one component to another component
• TLM is used for communication between two
components.
Types of TLM
• TLM Interface
• Port
• Export
• Imp Port
• Analysis Port
• FIFO
1. TLM Interface
• Blocking
• Non-blocking
Blocking:-
• Put,
• Get and
• Peek methods
1. Put:- The put method is used to send the transaction to another component.
Ex:- Handle.put(transaction)
2. Get:- Get method is used to receive the transaction from another component.
Ex:- handle.get(transaction)
1. Try_put:- The try_put method is used to send the transaction to another component.
Ex:- Handle .try_put();
2. Can_put:- this method is used to check whether the other component is ready to accept the
transaction else zero.
Ex:- handle.can_put();
3. Try_get:- the try_get method is used to receive transactions from another component.
Ex:- handle.try_get();
Syntax:-
Unidirectional :- uvm_*_port #(T)
Bi-directional:- uvm_*_port #(req,resp)
Example of tlm port
3. TLM Exports
• TLM exports have unidirectional and bidirectional
ports
• It will receive the data/transaction
Syntax:-
Unidirectional :- uvm_*_export #(T)
Bi-directional:- uvm_*_export #(req,resp)
Example of tlm export
4. TLM Imp Ports
• The TLM imp port is used to receive the transaction at the destination
• TLM imp ports have unidirectional and bidirectional ports
Syntax:-
Unidirectional :- uvm_*_imp #(T)
Bi-directional:- uvm_*_imp #(req,resp)
2.Uvm_tlm_analysis_fifo# (T)
An analysis FIFO is unbounded size with a write method
Syntax:-
Uvm_tlm_analysis_fifo #(T)
Callback methods
Steps to implement uvm_callback
1. Create a user-defined callback class that extends from the uvm_callback
class.
FIFO
Input Data Output Data
3
2 2 1 0
3 2 1 0 3
1
00
Out of Order Scoreboard
• The out-of-order scoreboard is useful for the design whose output
order is different from driven input stimuli.
• Based on the input stimuli reference model will generate the expected
outcome of DUT and the actual output is expected to come in any order
2 3
1 2
0 0