Thanks for replying. I put displays and verified your statement. As you said, initial block(config_db set()) is executed before build phase (config_db get()). But somehow, get() is not receiving the interface handle.
Set code inside module:
uvm_config_db#(virtual apss_tb_mhm_if)::set(uvm_root::get(), "uvm_test_top.m_env_h*", "apss_tb_mhm_vif", grouped_signals);
Get code inside env build phase:
`uvm_info(get_type_name(),"DID NOT GET THE INTF", UVM_NONE);
end else begin
`uvm_info(get_type_name(),"GOT THE INTF", UVM_NONE);
This is printing
"DID NOT GET THE INTF"
The interface used here is hierarchical (there are other interface instances inside aforementioned interface). I hope it doesn't have anything to do with this problem.
Else if that's indeed the problem, what are the options available : should I be setting and getting each instances of interfaces separately?
Even if I manage to get the outermost interface handle in env, can my agents(drivers) use the inner interfaces like this?:
Sorry that the doubts deviated from initial post. I started this exercise to try out hierarchical interface access inside env, but stuck with this config_db issue. If you can already point out limitations, I might as well be exploring some other ways of doing this.