I’m confused about these two function, I find some codes in our project like below :
initial begin
uvm_factory::set_type_override_by_type(packet::get_type(),mypacket::get_type());
packet::type_id::set_type_override(mypacket::get_type());
end
class test_inst extend test_base
virtual function void build_phase(uvm_phase phase)
super.build_phase(phase);
set_inst_override("*.seqr.*","packet","packet_me");
endclass
Frist question :
what’s the diffrent between set_type_override & set_type_override_by_type ???
Second question:
Factory type override syntax is :<original_type>::type_id::set_type_override(<substitute_type>::get_type(), replace);
Why does our project code have not “replace” ??