Dear All,
I’m trying to execute “start_item()~finish_item()” in a sequence. but problem is that
I’m stuck with error message [SEQ] neither the item’s sequencer nor dedicated sequencer has been supplied to start item when I start a virtual sequence with NULL.
Can’t I use “start_item()~finish_item()” in virtual sequence with NULL?
How to resolve sequence_item has null sequencer ?
class my_ahb extends my_base_test;
`uvm_component_utils(my_ahb)
my_ahb_base_test_seq_c my_ahb_base_test_seq;
vseq_c vseq;
function new(string name = "my_ahb", uvm_component parent);
super.new(name,parent);
`uvm_info(get_type_name(), "Build my_ahb", UVM_NONE)
endfunction : new
function void build_phase(uvm_phase phase);
super.build_phase(phase);
my_ahb_base_test_seq = my_ahb_base_test_seq_c::type_id::create("my_ahb_base_test_seq");
vseq = vseq_c::type_id::create("vseq");
endfunction : build_phase
task main_phase(uvm_phase phase);
phase.raise_objection(this, "Test objection for main phase");
vseq.my_ahb_seqr = systemTop_env0.my_ahb_agent0.m_sequencer;
// Test Start.
//////////////////////////////////////////////////////////////////////////////////////////////////////////
my_ahb_base_test_seq.start(null); //<---This null makes Error, start_item() can't use null.
/////////////////////////////////////////////////////////////////////////////////////////////////////////
phase.drop_objection(this, "Test objection for main phase");
endtask : main_phase
endclass : my_ahb
------my_ahb_seq------------------
class my_ahb_seq_c extends uvm_sequence #(my_ahb_transaction);
`uvm_object_utils_begin(my_ahb_seq_c)
//...
`uvm_object_utils_end
// new constructor
function new(string name="my_ahb_seq_c");
super.new(name);
endfunction // new
virtual task body();
//...
my_ahb_transaction tx;
tx=my_ahb_transaction::type_id::create("tx");
start_item(tx);
tx.randomize();
tx.start = m_start;
finish_item(tx);
get_response(rsp);
endtask: body
endclass
and I was mas virtual sequence as the below
class vseq_c extends uvm_sequence;
`uvm_object_utils (vseq_c)
my_ahb_seq_c my_ahb_seq;
my_ahb_sequencer my_ahb_seqr;
function new(string name="vseq_c");
super.new(name);
`uvm_info(get_type_name(), "the Virtual_sequence has been built", UVM_LOW)
endfunction
task pre_body();
my_ahb_seq = my_ahb_seq_c::type_id::create("my_ahb_seq");
endtask
virtual task body();
fork begin
my_ahb_seq.start (my_ahb_seqr);
end
join
endtask
endclass