In reply to chr_sue:
Thanks a lot for replying back. Indeed I do understand uvm_compnent and uvm_objects have different usage from UVM methodology perspective.
Unlike uvm_component, uvm_objects doesn’t have any phasing … which I required in my class(i.e. my_obj) hence extended from uvm_object.
class my_obj extends uvm_object;
`uvm_object_utils(my_obj);
local int log = -1;
string tID;
function new(string name = "");
super.new(name);
endfunction
function void build_phase(uvm_phase phase);
tID = get_type_name();
tID = tID.toupper();
`uvm_info(get_type_name(), $sformatf("my_comp build_phase"), UVM_MEDIUM)
`uvm_info(get_type_name(), $sformatf("tID = %s", tID), UVM_MEDIUM)
endfunction
function void configure(uvm_component creator = null);
...
From your example: build_phase function NEVER get’s called for my_obj as uvm_object doesn’t have build_phase at all. It’s like any other user defined function like configure.
While I do understand that probably I am doing exactly the UVM-way … but since UVM by default involves global reporting mechanism i.e. uvm_info call either from uvm_component or uvm_object should have resulted in same results … which isn’t the case.
I will explore a bit in uvm report handler to understand more.