UVM config db - set/get_config_object inst_name behavior

Please consider this structure for the below question -

top_env
    -sub_env0
        -foo_agent
    -sub_env1
        -foo_agent

I have a top_env in which there are two instances of the sub_env.

In each sub_env, there is a foo_agent. I set a config object for the foo_agent as -
set_config_object(“foo_agent”, “foo_agent_config_name”, foo_agent_config_object)

There will be two config objects created in the global table for “foo_agent_config_name”, one by each sub_env

In this case I have two questions -

  1. Will the foo_agent under sub_env0 be only able to access the agent config by its parent env(sub_env0) and not by the other sub_env(sub_env1)?
  2. In general, when you provide the inst_name in the set_config_object(foo_agent in this case), is the path to the entity it is being set in automatically prepended to the inst_name? basically, even though I wrote “foo_agent”, is the object stored with inst_name “top_env.sub_env0.foo_agent”?

In reply to megatron:

Please note the set_config_/get_config_ are deprecated in UVM-1.2 Use instead the uvm_config_db.

Wrt to the set_config_object see here:
virtual function void set_config_object (string inst_name, string field_name, uvm_object value, bit clone = 1)
The inst_name is used to specify a specific instance in the set/get.