I have a sequence class which calls another class subseq like:
task body();
sub_seq sub_seq_1;
`uvm_do(sub_seq_1,{m_write_data = 0xabcd})
endtask
I have to override sub_seq, so I am extending it.
sub_seq_ext extends sub_seq;
..
rand bit[31:0] m_write_data;
task body();
`uvm_info(get_name(),$sformatf("m_write_data %0h:",m_write_data),UVM_LOW)
endtask
....
endclass
I have override the sub_seq by set_type_override_by_type in base test.
class base_test extends uvm_test;
....
function void start_of_simulation_phase(uvm_phase phase);
begin
`uvm_info("SEQ_OVERRIDE","Overriding sequence ",UVM_LOW)
sub_seq :: type_id :: set_type_override(sub_seq_ext :: get_type());
end
....
endclass
I am seeing that it is calling override seq’s body but it is not taking the constraint value (0xabcd). it gives a random number.
Any idea of possibly what went wrong here?