hi ,
I have sorted out the problem to some extent .
the code i have provided is somewhat wrong so i am giving the new code
this is my environment :
class axi_env extends ovm_env;
axi_ovm_master_agent a_master,a_master1 ; //master agents
axi_ovm_slave_agent a_slave,a_slave1 ; // slave agents
// create two master and slave agents
virtual function void build();
super.build();
a_master = axi_ovm_master_agent::type_id::create(“a_master”, this);
a_master1 = axi_ovm_master_agent::type_id::create(“a_master1”, this);
a_slave = axi_ovm_slave_agent::type_id::create(“a_slave”, this);
a_slave1 = axi_ovm_slave_agent::type_id::create(“a_slave1”, this);
endfunction : build
endclass
MASTER AGENT
class axi_ovm_master_agent extends ovm_agent;
axi_ovm_master_sequencer sequencer;
axi_ovm_master_driver driver ;
axi_ovm_master_monitor monitor ;
virtual function void build();
super.build();
driver=axi_ovm_master_driver::type_id::create(“driver”,this);
sequencer=axi_ovm_master_sequencer::type_id::creat e(“sequencer”,this);
monitor=axi_ovm_master_monitor::type_id::create(“monitor”,this);
endfunction : build
endclass
driver , sequencer and monitor will be created for both master agents by the above code.
FIRST SEQUENCER
class axi_ovm_master_sequencer extends ovm_sequencer #(axi_ovm_master_trans);
`ovm_sequencer_utils(axi_ovm_master_sequencer)
function new(string name, ovm_component parent);
super.new(name,parent);
`ovm_update_sequence_lib_and_item(axi_ovm_master_t rans)
endfunction : new
endclass : nvs_axi_ovm_master_sequencer
SECOND SEQUENCER
class axi_ovm_master_sequencer extends ovm_sequencer #(axi_ovm_master_trans);
`ovm_sequencer_utils(axi_ovm_master_sequencer)
function new(string name, ovm_component parent);
super.new(name,parent);
`ovm_update_sequence_lib_and_item(axi_ovm_master_trans)
endfunction : new
endclass : nvs_axi_ovm_master_sequencer
and the drivers are :
FIRST DRIVER
class axi_ovm_master_driver extends ovm_driver #(axi_ovm_master_trans);
axi_ovm_master_trans item;
task run;
seq_item_port.get_next_item(item);
send_to_dut(item);
seq_item_port.item_done();
endtask
endclass
SECOND DRIVER
class axi_ovm_master_driver extends ovm_driver #(axi_ovm_master_trans);
axi_ovm_master_trans item;
task run;
seq_item_port.get_next_item(item);
send_to_dut(item);
seq_item_port.item_done();
endtask
endclass
as by the above code , i think class name of both drivers and both sequencer should be same .
becase drivers and sequencers are of same type for “a_master” and “a_master1” agent
my query is:
how can first sequencer and first driver be linked with "a_master’ agent and second sequencer and second driver with “a_master1” agent ?
such that both master agents should work simultaneously.means to say that
FIRST SEQUENCER should generate the sequence and give it to FIRST DRIVER AND SECOND SEQUENCER should generate the sequence and give it to SECOND DRIVER simultaneously.
regards
saurabh jain