ovm_sequencer_param_base #(REQ,RSP)

Provides base functionality used by the ovm_sequencer and ovm_push_sequencer.  The implementation is dependent on REQ and RSP parameters.

Summary
ovm_sequencer_param_base #(REQ,RSP)
Provides base functionality used by the ovm_sequencer and ovm_push_sequencer.
Class Hierarchy
ovm_sequencer_param_base#(REQ,RSP)
Class Declaration
class ovm_sequencer_param_base #(
   type REQ =  ovm_sequence_item,
   type RSP =  REQ
) extends ovm_sequencer_base
Ports
rsp_exportThis is the analysis export used by drivers or monitors to send responses to the sequencer.
Methods
newCreates and initializes an instance of this class using the normal constructor arguments for ovm_component: name is the name of the instance, and parent is the handle to the hierarchical parent, if any.
send_requestThe send_request function may only be called after a wait_for_grant call.
get_current_itemReturns the request_item currently being executed by the sequencer.
start_default_sequenceCalled when the run phase begins, this method starts the default sequence, as specified by the default_sequence member variable.
get_num_reqs_sentReturns the number of requests that have been sent by this sequencer.
get_num_rsps_receivedReturns the number of responses received thus far by this sequencer.
set_num_last_reqsSets the size of the last_requests buffer.
get_num_last_reqsReturns the size of the last requests buffer, as set by set_num_last_reqs.
last_reqReturns the last request item by default.
set_num_last_rspsSets the size of the last_responses buffer.
get_num_last_rspsReturns the max size of the last responses buffer, as set by set_num_last_rsps.
last_rspReturns the last response item by default.
execute_itemThis task allows the user to supply an item or sequence to the sequencer and have it be executed procedurally.

rsp_export

This is the analysis export used by drivers or monitors to send responses to the sequencer.  When a driver wishes to send a response, it may do so through exactly one of three methods:

seq_item_port.item_done(response)
seq_item_done.put(response)
rsp_port.write(response)

The rsp_port in the driver and/or monitor must be connected to the rsp_export in this sequencer in order to send responses through the response analysis port.

new

function new (string name,
ovm_component parent)

Creates and initializes an instance of this class using the normal constructor arguments for ovm_component: name is the name of the instance, and parent is the handle to the hierarchical parent, if any.

send_request

virtual function void send_request(ovm_sequence_base sequence_ptr,  
ovm_sequence_item t,  
bit rerandomize =  0)

The send_request function may only be called after a wait_for_grant call.  This call will send the request item, t, to the sequencer pointed to by sequence_ptr.  The sequencer will forward it to the driver.  If rerandomize is set, the item will be randomized before being sent to the driver.

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 requsted.

start_default_sequence

virtual task start_default_sequence()

Called when the run phase begins, this method starts the default sequence, as specified by the default_sequence member variable.

get_num_reqs_sent

function int get_num_reqs_sent()

Returns the number of requests that have been sent by this sequencer.

get_num_rsps_received

function int get_num_rsps_received()

Returns the number of responses received thus far by this sequencer.

set_num_last_reqs

function void set_num_last_reqs(int unsigned max)

Sets the size of the last_requests buffer.  Note that the maximum buffer size is 1024.  If max is greater than 1024, a warning is issued, and the buffer is set to 1024.  The default value is 1.

get_num_last_reqs

function int unsigned get_num_last_reqs()

Returns the size of the last requests buffer, as set by set_num_last_reqs.

last_req

function REQ last_req(int unsigned n =  0)

Returns the last request item by default.  If n is not 0, then it will get the nth before last request item.  If n is greater than the last request buffer size, the function will return null.

set_num_last_rsps

function void set_num_last_rsps(int unsigned max)

Sets the size of the last_responses buffer.  The maximum buffer size is 1024.  If max is greater than 1024, a warning is issued, and the buffer is set to 1024.  The default value is 1.

get_num_last_rsps

function int unsigned get_num_last_rsps()

Returns the max size of the last responses buffer, as set by set_num_last_rsps.

last_rsp

function RSP last_rsp(int unsigned n =  0)

Returns the last response item by default.  If n is not 0, then it will get the nth-before-last response item.  If n is greater than the last response buffer size, the function will return null.

execute_item

virtual task execute_item(ovm_sequence_item item)

This task allows the user to supply an item or sequence to the sequencer and have it be executed procedurally.  The parent sequence for the item or sequence is a temporary sequence that is automatically created.  There is no capability to retrieve responses.  The sequencer will drop responses to items done using this interface.

virtual class ovm_object extends ovm_void
The ovm_object class is the base class for all OVM data and hierarchical classes.
class ovm_report_object extends ovm_object
The ovm_report_object provides an interface to the OVM reporting facility.
virtual class ovm_component extends ovm_report_object
The ovm_component class is the root base class for OVM components.
class ovm_sequencer_base extends ovm_component
Controls the flow of sequences, which generate the stimulus (sequence item transactions) that is passed on to drivers for execution.
class ovm_sequencer_param_base #(
   type REQ =  ovm_sequence_item,
   type RSP =  REQ
) extends ovm_sequencer_base
Provides base functionality used by the ovm_sequencer and ovm_push_sequencer.
function new (string name,
ovm_component parent)
Creates and initializes an instance of this class using the normal constructor arguments for ovm_component: name is the name of the instance, and parent is the handle to the hierarchical parent, if any.
virtual function void send_request(ovm_sequence_base sequence_ptr,  
ovm_sequence_item t,  
bit rerandomize =  0)
The send_request function may only be called after a wait_for_grant call.
function REQ get_current_item()
Returns the request_item currently being executed by the sequencer.
virtual task start_default_sequence()
Called when the run phase begins, this method starts the default sequence, as specified by the default_sequence member variable.
function int get_num_reqs_sent()
Returns the number of requests that have been sent by this sequencer.
function int get_num_rsps_received()
Returns the number of responses received thus far by this sequencer.
function void set_num_last_reqs(int unsigned max)
Sets the size of the last_requests buffer.
function int unsigned get_num_last_reqs()
Returns the size of the last requests buffer, as set by set_num_last_reqs.
function REQ last_req(int unsigned n =  0)
Returns the last request item by default.
function void set_num_last_rsps(int unsigned max)
Sets the size of the last_responses buffer.
function int unsigned get_num_last_rsps()
Returns the max size of the last responses buffer, as set by set_num_last_rsps.
function RSP last_rsp(int unsigned n =  0)
Returns the last response item by default.
virtual task execute_item(ovm_sequence_item item)
This task allows the user to supply an item or sequence to the sequencer and have it be executed procedurally.