我正在尝试按实例覆盖序列。一个示例代码将最好地描述它:
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
我的目标是只覆盖seq2
(seq3
其类型扩展seq2
的类型)。我没有收到任何错误,但原始序列运行,我做错了什么?
提前致谢,
伊扎尔