I'm trying to override a sequence by instance. An example code will describe it best:
class my_vir_seq extends base_vir_seq;
my_seq_c seq1, seq2;
`uvm_object_utils_begin(my_vir_seq)
`uvm_field_object(seq1, UVM_ALL_ON)
`uvm_field_object(seq2, UVM_ALL_ON)
`uvm_object_utils_end
`uvm_declare_p_sequencer(v_seqr)
function new(string name = "my_vir_seq");
super.new(name);
endfunction // new
virtual task body();
`uvm_do_on(seq1, p_sequencer.my_seqr)
`uvm_do_on(seq2, p_sequencer.my_seqr)
endtask // body
endclass
class my_err_vir_seq extends my_vir_seq;
my_err_seq_c seq3;
`uvm_object_utils_begin(my_err_vir_seq)
`uvm_field_object(seq3, UVM_ALL_ON)
`uvm_object_utils_end
`uvm_declare_p_sequencer(v_seqr)
function new(string name = "my_err_vir_seq");
super.new(name);
my_seq_c::type_id::set_inst_override(my_err_seq_c::get_type(), "sve.v_seqr.my_err_vir_seq.seq2" );
endfunction // new
endclass
My aim is to only override seq2
with seq3
(its type extends seq2
's type).
I don't get any errors, but the original sequence runs,
What am I doing wrong?
Thanks in advance,
Izhar