0% found this document useful (0 votes)
109 views

UVM Sequences

This document discusses UVM sequences. It states that UVM sequences are easy to use and minimize protocol/environment knowledge requirements. Sequences can generate stimulus based on constraints, be generated on-the-fly or at time zero, and can nest sequences. Sequences override using factories. To create a sequence, one extends from uvm_sequence and writes code in pre_body, body, and post_body task methods. The document also describes how sequence items flow from the sequence to the sequencer to the driver and back, and discusses APIs, macros, configuration, default sequences, and sequence libraries.

Uploaded by

kartik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

UVM Sequences

This document discusses UVM sequences. It states that UVM sequences are easy to use and minimize protocol/environment knowledge requirements. Sequences can generate stimulus based on constraints, be generated on-the-fly or at time zero, and can nest sequences. Sequences override using factories. To create a sequence, one extends from uvm_sequence and writes code in pre_body, body, and post_body task methods. The document also describes how sequence items flow from the sequence to the sequencer to the driver and back, and discusses APIs, macros, configuration, default sequences, and sequence libraries.

Uploaded by

kartik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

UVM Sequences

UVM Sequence
● Easy to use
○ Minimize the protocol / environment knowledge requirements uvm_object
● Generate stimulus based on constraints
● Can be generated on-the-fly or at time zero uvm_transaction
● Can nest sequences
● Override sequences using factory uvm_sequence_item

● To create sequence uvm_sequence

○ Extend from uvm_sequence Stimulus Generation


○ User code in task methods pre_body, body and post_body
Sequence item flow
Sequence Sequencer Driver

1. Wait for request from Driver 1. Send a request to get the sequence item

2. Generate the transaction (sequence item) 2. Wait for the sequence item

3. Give the sequence item to driver 3. Drive the sequence item to DUT

4. Wait for acknowledgement or response 4. Send the acknowledgement or response


Sequence item flow
Sequence Sequencer Driver

1. Wait for request from Driver 1. Send a request to get the sequence item

Start_item (req) ; 2. Wait for the sequence item

2. Generate the transaction (sequence item) get_next_item (req) ;

req.randomize() ; 3. Drive the sequence item to DUT

3. Give the sequence item to driver User defined task

4. Wait for acknowledgement or response 4. Send the acknowledgement or response

finish_item (req) ; item_done () ;


Sequence item flow
Sequence Sequencer Driver

Test
Starting Sequence Item
● APIs for a sequence item
○ Start_item, finish_item, get_response
● To start a sequence on a sequencer
○ Use start() method
Using Macros
● For a sequence item to start on a sequencer
○ `uvm_do , `uvm_do_with

Does not call pre_body


and post_body methods
of a sequence
Items with Inline constraints
Sequence - Configuration
get_full_name fetches
the instance path for the
sequence based on the
sequencer on which this
sequence is started
Setting Default Sequence
● Use run_phase specific default sequence:
● Replace with :
○ Using Wrapper

○ Using Instance
Sequence Objection

Starting_phase is set
When this sequence is
set as default sequence
Sequence Library
Needed to populate the
sequence library with any
sequences that were
registered with it or any of
its base classes

my_seq_lib

seq1
Macro to add seq2
sequence to a
sequence library

seqN
Thank You

You might also like