Dear All,
I used create method for override.
So I made as the below example.
Basically, as I Know the create method used with argument.
I’m Confused that the purpose of argument. So I made 4 example of argument as the below. There are no error.
So I want to know the purpose of argument and what is the correct Usage and standard for with 4 examples.
Could you please explain it?
I came across the example as below when I googling.
EXAMPLE:
class_type object_name;
object_name = clss_type::type_id::creat("object_name",this);
It seems that argument must have to be same as object name. But In my case, Different cases also has no compile error. Why?
module example();
...
agent_a agent_a_h;
agent_c agent_c_h;
my_uvm_agent handle;
initial begin
uvm_factory factory;
factory = uvm_factory::get();
my_uvm_agent::type_id::set_type_override(agent_c::get_type());
handle = my_uvm_agent::type_id::create("agent_a_h", null); //No Error
handle = my_uvm_agent::type_id::create("aaa", null); //No Error
handle = my_uvm_agent::type_id::create("my_uvm_agent", null); //No Error
handle = my_uvm_agent::type_id::create("handle", null); //No Error
factory.print();
handle.display();
end
...
endmodule