Hello,
the UVM reference 1.1, while explaining set_inst_override_by_type and set_inst_override_by_name states following on page 83:
“When the factory processes instance overrides, the instance queue is processed in order of override registrations, and the first override match prevails. Thus, more specific overrides should be registered first, followed by more general overrides.”
Does this mean that there are multiple overrides to the same component instance (these could be from different parts of code), they are stored in a queue. Also last sentence “Thus, more specific overrides should be registered first, followed by more general overrides.” is also not clear.
Can someone explain in detail.
Also uvm reference 1.1 states following on page 85 while explaining the create_component_by_type and create_component_by_name :
“Override searches are recursively applied, with instance overrides taking precedence over type overrides. If foo overrides bar, and xyz overrides foo, then a request for bar will produce xyz. Recursive loops will result in an error, in which case the type returned will be that which formed the loop. Using the previous example, if bar overrides xyz, then
bar is returned after the error is issued.”
Does this mean factory stores the information about instance and type overrides in same data structure and “create” function first checks if there is an instance override and if there is no instance override, checks for type override and accordingly returns the instance of the overriden type (decided by instance or type override with instance override taking priority). Also is it possible to set multiple type overrides on same type (for example type1 overridden by type2 in one place and type1 overridden by type3 in another place? In that case which one takes effect?) Also can same type by overridden recursively, like type1 overriden by type2 and type2 overriden by type3 etc?
Can someone explain in detail please.
regards,
-sunil puranik