What will be happened if i did not register a component/object with factory

Hi,

May i know what is actual purpose of registering a component/object with factory.

when a super class is registered with factory then is it necessarily to register child classes also with factory.

All methods which are available in super class will be automatically inherited to child classes also, then what is the purpose to register child classes with factory.

There are several reasons to register your components/objects with the factory:

  1. Provide a common method for creating instances of your classes via the create() method.
  2. Allow for ease of replacing compatible components using factory overrides.
  3. Ensure that your component is easy to be reused by other UVM developers who expect every component/object to be registered with the factory.

These significant benefits (plus some additional ones) are available with only one line of code.

In reply to pkoti0583:

cgales answer is a great concise answer.

Clifford Cummings’ paper:
The OVM/UVM Factory & Factory Overrides
How They Work - Why They Are Important

Has an good ah-hah! rating regarding this, among other things. ;) *section 5 and 6 or so