|
OVM sequencer and OVM sequencer utils
|
OVM sequencer :
Sequencer generates stimulus data and passes it to the driver. All sequencers should be derived from the ovm_sequence base class directly or indirectly. Sequencer have a TLM port which is connected to the driver. ovm_sequence base call is parameterized for request and respose item types.
So to create a sequencer to you need to :
- Derive a sequencer from the ovm_sequencer base class and specify the request and response type parameters
- Use `ovm_sequencer_utils and `ovm_update_sequence_lib_and_item to indicate the generated data item type and field desired automation
Connecting the Driver and Sequencer :
The driver and the sequencer are connected via TLM, with the driver’s seq_item_port connected to the sequencer’s seq_item_export. elow). The sequencer produces data items to provide via the export. The driver consumes data items through its seq_item_port, and optionally provides responses. The component that contains the instances of the driver and sequencer makes the connection between them
Example :
m_env0.m_driver.seq_item_port.connect(m_env0.m_sequencer.seq_item_export);
OVM sequencer example :
// OVM sequencer example
class mem_master_sequencer extends ovm_sequencer # (mem_transfer);
protected virtual mem_if m_if;
protected int master_id;
`ovm_object_utils_begin (mem_master_sequencer)
`ovm_field_int (master_id, OVM_ALL_ON)
`ovm_object_utils_end
`ovm_declare_sequence_lib
// constructor
function new (string name = "mem_master_sequencer", ovm_component parent = null) ;
super.new (name, parent);
`ovm_update_sequence_lib_and_item(mem_transfer)
endfunction : new
function void assign_vi (virtual interface mem_if m_if);
this.m_if = m_if;
endfunction : assign_vi
endclass : mem_master_sequencer
|
| Keywords :
ovm_sequencer
sequencer
|
|
This Articles is written/submitted by puneet (Puneet Aggarwal). You can also contribute to Asicguru.com. Click here to start
|
Prev << ovm-driver
|
Next >> OVM Monitor
|
Posted By : Santosh - 2010-02-02 06:27:10
Hi Puneet, I am looking for virtual sequencer example. --Santosh.