Uvm_factory

Why should any Uvm_component be registered with factory?

In reply to anvesh dangeti:

EVERY uvm_component and every uvm_object should be registered with the factory. This is a critical feature of reuse and modularity in UVM because the factory allows you to swap in a different (but compatible) component/object for the original without modifying the original code. Please see any of the following:

In reply to tfitz:

In reply to anvesh dangeti:
EVERY uvm_component and every uvm_object should be registered with the factory.

Please allow me to clarify. EVERY uvm_component and uvm_object that you may wish to override should be registered with the factory. For a lot of automatically generated code, like register models, which will not be overridden, the factory introduces too much overhead.

As with any verification activity, adequate planning is required to build in the flexibility that you may need to accomplish certain tasks down the line. For almost all applications, using the uvm_factory and the create() method will give you that flexibility.