One thing that always confuses me: is whether add uvm_component parent
in the class constructor of UVM objects or not.
As I understood for all items inherited from uvm_component
, they all need uvm_component parent
as part of constructor input argument.
function new (string name, uvm_component parent);
super.new(name, parent);
endfunction
But all classes inheretied from uvm_object
, they dont need.
My question is why?
Per my understanding we are providing uvm_component parent
for factory can replace these objects, why uvm_object inherited class dont need to be replaced by factory?
And one more interesting fact I noticed for uvm_sequence: so uvm_sequence constructor does nor require uvm_component parent
attribute, but when we create the sequence by factory we provide the parent argument.