I have a basic query about the class constructor in OVM/UVM:
I have a Psudeo code below to understand the query:
class a_component extends ovm_component;
function new(string name = "a_component",ovm_component parent);
class b_component extends ovm_component;
function new(string name = "b_component",ovm_component parent = null);
Here we have 2 OVM components a_component, b_component i have the below mentioned quires:
1 Why is that we are using super.new(name,parent) in both the component, is it that we are creating the hierarchy of the parent component? what is the necessity of doing this?
2. In the component b_inst we are declaring ovm_component parent = null, in this case as we are doing super.name(name,parent), what are we exactly doin here? what is the need of declaring the parent as null?