In reply to dhserfer:
@dhserfer : If i understood your comment rightly, this is the way your are suggesting:
class xyz
// …
// xyz class specific
// …
byreddy_env handle_byreddy;
function soc_get_address();
longint unsigned my_addr; // local variable to store address
if(handle_byreddy == null) begin
byreddy_env abc; // byreddy_env is my IP UVM component
if( !$cast(abc,uvm_top.find(“*u_byreddy_env”)) ) // u_byreddy_env is instance of byreddy_env
`uvm_fatal(//the object doesn’t exist)
handle_byreddy = abc;
my_addr = handle_byreddy.get_system_address();
end
endfunction // function soc_get_address();
endclass //class xyz
Please let me know.