Hi.
I have seen in some papers, writers used
…
my_component inst_my_component;
string comp_name;
$cast(inst_my_component, create_component(“my_component”, comp_name));
i am not sure any difference or advantages over type_id::create()
namely:
inst_my_component = my_component::type_id::create(“inst_my_component”, this);
assume i already registered the my_component into factory.
here type_id refer to uvm_component type or my_component.
generally what is type_id?. it is object or variable.
type_id is accessing using scope resolution operator (i.e ::). scope resolution operator uses to access static members class. so is type_id is static in nature ?