Hello,
I have a question on set_type_override_by_type API of factory -
UVM reference manual gives following description of the set_type_override_by_type API:
function void set_type_override_by_type (uvm_object_wrapper original_type,uvm_object_wrapper override_type,bit replace = 1);
When overriding by type, the original_type and override_type are handles to the types’
proxy objects. Preregistration is not required.
When overriding by name, the original_type_name typically refers to a preregistered type
in the factory. It may, however, be any arbitrary string. Future calls to any of the
create_* methods with the same string and matching instance path will produce the type
represented by override_type_name, which must be preregistered with the factory.
When replace is 1, a previous override on original_type_name is replaced, otherwise a
previous override, if any, remains intact.
Now if we set two overrides with replace bit zero, which one will take effect :
set_type_override_by_type(trans::get_type(), trans2::get_type());
set_type_override_by_type(trans::get_type(), trans3::get_type(), 1'b0);
In this case, will create return object of type trans3 or trans2. How is it decided?
thanks,
-sunil