What Is The Advantage And Difference Of `uvm_component_utils() And `uvm_object_utils()?
Answer»
The utile macros define the infrastructure needed to enable the object/component for correct factory operation.
The reason there are two macros is because the factory DESIGNPATTERN fixes the number of arguments that a constructor can have. Classes derived from uvm_object have constructors with one ARGUMENT, a string name. Classes derived from uvm_component have two arguments, a name and a uvm_component parent.
The two `uvm_*utile macros inserts code that GIVES you a factory create() method that delegates calls to the constructors of uvm_object or uvm_component. You need to use the respective MACRO so that the correct constructor arguments get passed through. This means that you cannot add extra constructor arguments when you extend these classes in order to be able to use the UVM factory.