Factory Classes

As the name implies, the uvm_factory is used to manufacture (create) UVM objects and components.  Only one instance of the factory is present in a given simulation.

User-defined object and component types are registered with the factory via typedef or macro invocation, as explained in uvm_factory::Usage.  The factory generates and stores lightweight proxies to the user-defined objects and components: uvm_object_registry #(T,Tname) for objects and uvm_component_registry #(T,Tname) for components.  Each proxy only knows how to create an instance of the object or component it represents, and so is very efficient in terms of memory usage.

When the user requests a new object or component from the factory (e.g.  uvm_factory::create_object_by_type), the factory will determine what type of object to create based on its configuration, then ask that type’s proxy to create an instance of the type, which is returned to the user.

Summary
Factory Classes
As the name implies, the uvm_factory is used to manufacture (create) UVM objects and components.
class uvm_factory
As the name implies, uvm_factory is used to manufacture (create) UVM objects and components.
Using the factory involves three basic operations
class uvm_object_registry #(
    type  T  =  uvm_object,
    string  Tname  =  "<unknown>"
) extends uvm_object_wrapper
The uvm_object_registry serves as a lightweight proxy for an uvm_object of type T and type name Tname, a string.
class uvm_component_registry #(
    type  T  =  uvm_component,
    string  Tname  =  "<unknown>"
) extends uvm_object_wrapper
The uvm_component_registry serves as a lightweight proxy for a component of type T and type name Tname, a string.
function uvm_object create_object_by_type ( uvm_object_wrapper  requested_type,   
string  parent_inst_path  =  "",
string  name  =  "" )