In reply to verif_learner:
Yes , parent should be passed while creating the agent , else it will come under the scope of UVM_TOP . I am attaching 1 code snippet and output .
env_code :
abc h_dummy;
abc h_dummy1;
build_phase()
h_dummy = abc::type_id::create(“config_h_dummy”,null); // with null parent
h_dummy1 = abc::type_id::create(“config_h_dummy1”,this); // with parent as env
Output topology :
Name-----------------------------------Type----------------------------------Size----Value
h_dummy--------------------------------abc-------------------------------------#-----@2207
uvm_test_top---------------------------base_test-------------------------------#-----@833
–env---------------------------------------env-------------------------------------#-----@874
—h_dummy1----------------------------abc-------------------------------------#-----@2216
From functionality point of view , it won’t make any noticable difference unless you are using any handle hierarchically , but its always better to maintain the TB hierarchy the way data flows .