Skip to content

UVM · Topic

UVM Factory — Registration, create() and Overrides

Factory registration, type and instance overrides, and why an object must be built with create() for any of it to work.

The factory exists so a test can change what a testbench builds without editing the testbench. That only works if every object is requested through `type_id::create()` rather than `new()`: `new()` names a concrete class at compile time and no override can intervene. This is the single most common factory failure, and it is silent — the testbench runs with the base class and reports nothing, because nothing went wrong from the framework's point of view.

Lessons in this topic(7)

Start hereWhy the Factory ExistsUVM Why the Factory Exists
  1. 2The Factory Pattern
  2. 3The UVM Factory
  3. 4Type vs Instance Override
  4. 5UVM Factory Debug
  5. 6Common Factory Bugs
  6. 7Override Best Practices