Uvm_component/object name

Probably, this is a silly question …

It seems that uvm_components and uvm_objects derivatives pass name of the components/objects as arg. to constructor.
For example,

function new(string name = "my_component", uvm_component parent = null);
super.new(name, parent);
endfunction

Similar code applies for uvm_object also.

The name string seems to be used to keep track of testbench component hierarchy etc.

My question is, why should users pass this information as this is additional work?
The names of the object is already present when the object is crated by the parent.

Also, what are the implications if the string value to name is different from actual component name?
For example:

class my_component extends uvm_component;
function new(string name = "not_my_component", uvm_component parent = null);
super.new(name, parent);
endfunction

In reply to verif_learner:

I think this part: string name = “my_component”, needs to be assigned for overriding the parent name value. May be this could be removed in future versions of UVM.

When you provide different name, than it gives error I assume~ Need checking by simulation.

Thanks

In reply to verif_learner:

uvm_component names need to be unique if they share the same parent. The names are also used by other features like the factory and uvm_config_db. So if you ever have more than one instance of the same type of class, it’s best to give them unique names.