In a UVM testbench, you have a baseline driver component named base_drv and a specialized high-speed driver named fast_drv (extended from base_drv). You wish to replace all instances of base_drv with fast_drv for one specific stress test without modifying the core environment code. Which UVM mechanism is strictly used for this, and in which phase should it be invoked?
The UVM factory provides override mechanisms to substitute component types without altering the testbench hierarchy code. To replace all instances globally, a type override (set_type_override_by_type or set_type_override_by_name) is used. Because components are instantiated during the build_phase based on factory lookups, the override must be registered at the very beginning of the build_phase of the top-level test, before the lower-level environment components attempt to build themselves.