ovm_sequence #(REQ,RSP)

The ovm_sequence class provides the interfaces necessary in order to create streams of sequence items and/or other sequences.

Summary
ovm_sequence #(REQ,RSP)
The ovm_sequence class provides the interfaces necessary in order to create streams of sequence items and/or other sequences.
Class Hierarchy
Class Declaration
virtual class ovm_sequence #(
   type REQ =  ovm_sequence_item,
   type RSP =  REQ
) extends ovm_sequence_base
Methods
newCreates and initializes a new sequence object.
startThe start task is called to begin execution of a sequence.
send_requestThis method will send the request item to the sequencer, which will forward it to the driver.
get_current_itemReturns the request item currently being executed by the sequencer.
get_responseBy default, sequences must retrieve responses by calling get_response.
set_sequencerSets the default sequencer for the sequence to sequencer.

new

function new (string name =  "ovm_sequence",
ovm_sequencer_base sequencer_ptr =  null,
ovm_sequence_base parent_seq =  null)

Creates and initializes a new sequence object.

The sequencer_ptr and parent_seq arguments are deprecated in favor of their being set in the start method.

start

virtual task start (ovm_sequencer_base sequencer,  
ovm_sequence_base parent_sequence =  null,
integer this_priority =  100,
bit call_pre_post =  1)

The start task is called to begin execution of a sequence.

The sequencer argument specifies the sequencer on which to run this sequence.  The sequencer must be compatible with the sequence.

If parent_sequence is null, then the sequence is a parent, otherwise it is a child of the specified parent.

By default, the priority of a sequence is 100.  A different priority may be specified by this_priority.  Higher numbers indicate higher priority.

If call_pre_post is set to 1, then the pre_body and post_body tasks will be called before and after the sequence body is called.

send_request

function void send_request(ovm_sequence_item request,  
bit rerandomize =  0)

This method will send the request item to the sequencer, which will forward it to the driver.  If the rerandomize bit is set, the item will be randomized before being sent to the driver.  The send_request function may only be called after ovm_sequence_base::wait_for_grant returns.

get_current_item

function REQ get_current_item()

Returns the request item currently being executed by the sequencer.  If the sequencer is not currently executing an item, this method will return null.

The sequencer is executing an item from the time that get_next_item or peek is called until the time that get or item_done is called.

Note that a driver that only calls get will never show a current item, since the item is completed at the same time as it is requested.

get_response

task get_response(output RSP response,  
input int transaction_id =  -1)

By default, sequences must retrieve responses by calling get_response.  If no transaction_id is specified, this task will return the next response sent to this sequence.  If no response is available in the response queue, the method will block until a response is recieved.

If a transaction_id is parameter is specified, the task will block until a response with that transaction_id is received in the response queue.

The default size of the response queue is 8.  The get_response method must be called soon enough to avoid an overflow of the response queue to prevent responses from being dropped.

If a response is dropped in the response queue, an error will be reported unless the error reporting is disabled via set_response_queue_error_report_disabled.

set_sequencer

virtual function void set_sequencer(ovm_sequencer_base sequencer)

Sets the default sequencer for the sequence to sequencer.  It will take effect immediately, so it should not be called while the sequence is actively communicating with the sequencer.

virtual class ovm_object extends ovm_void
The ovm_object class is the base class for all OVM data and hierarchical classes.
virtual class ovm_transaction extends ovm_object
The ovm_transaction class is the root base class for OVM transactions.
class ovm_sequence_item extends ovm_transaction
The base class for user-defined sequence items and also the base class for the ovm_sequence class.
class ovm_sequence_base extends ovm_sequence_item
The ovm_sequence_base class provides the interfaces needed to create streams of sequence items and/or other sequences.
virtual class ovm_sequence #(
   type REQ =  ovm_sequence_item,
   type RSP =  REQ
) extends ovm_sequence_base
The ovm_sequence class provides the interfaces necessary in order to create streams of sequence items and/or other sequences.
function new (string name =  "ovm_sequence",
ovm_sequencer_base sequencer_ptr =  null,
ovm_sequence_base parent_seq =  null)
Creates and initializes a new sequence object.
virtual task start (ovm_sequencer_base sequencer,  
ovm_sequence_base parent_sequence =  null,
integer this_priority =  100,
bit call_pre_post =  1)
The start task is called to begin execution of a sequence.
function void send_request(ovm_sequence_item request,  
bit rerandomize =  0)
This method will send the request item to the sequencer, which will forward it to the driver.
function REQ get_current_item()
Returns the request item currently being executed by the sequencer.
task get_response(output RSP response,  
input int transaction_id =  -1)
By default, sequences must retrieve responses by calling get_response.
virtual function void set_sequencer(ovm_sequencer_base sequencer)
Sets the default sequencer for the sequence to sequencer.
virtual task wait_for_grant(int item_priority =  -1,
bit lock_request =  0)
This task issues a request to the current sequencer.