Overview
The UVM Factory is a design-pattern mechanism within UVM used to substitute an object with a derived-type object without modifying the existing testbench structure or code. This substitution capability is provided through factory overrides, which may be applied by type or by instance.
Purpose
The factory is used to introduce variation into a verification environment while preserving the testbench infrastructure. The cited source describes this as useful for changing sequence behavior or replacing one version of a component with another.
Override compatibility requirements
For a component swap to work correctly, the original and replacement components must be polymorphically compatible. The evidence specifically states that compatible components must have identical TLM interface handles and that the replacement component must create the required TLM objects.
Coding conventions
Use of the UVM Factory requires adherence to specific coding conventions. The evidence does not enumerate those conventions, but it states that following them is mandatory in order to leverage the factory mechanism.
Role in UVM
UVM is described as a SystemVerilog class framework for building verification testbenches, including components such as drivers, monitors, stimulus generators, and scoreboards. Within that object-oriented framework, the factory supports flexible substitution and extension of verification components and objects.