Constructor

In reply to dave_59:

Thanks Dave, i understand that create() method calls new() method , but i wanted to know, can i directly call new method (here i am not using create method) of uvm_component class to create an object of class ‘A’ which extends from uvm_component??

Like this :

class A extends uvm_component;

endclass

class B extends uvm_component;
A a1;
function void build_phase(uvm_phase phase);
a1 = new(“a1”,this)
endfunction
endclass

Here when i’am trying to do this,
I am getting this error:

** Error: …/src/Level0.svh(2): Super class constructor has non-default arguments. Arguments can be specified in the “extends” clause or by calling super.new() explicitly.