thank you for ur reply.
if we use same string name is it set and get properly
top:
uvm_config_db #(virtual phy_if #(1))::set(null, "*", "string", INTF_1);
uvm_config_db #(virtual mdio_if)::set(null,"*","string",in0);
test:
if (has_wagent)
begin
begin
wr_cfg_h = new[no_of_mdio_wr_agents];
begin
wr_cfg_h[0] = wr_agent_config::type_id::create( "wr_cfg_h[0]");
if (!uvm_config_db #(virtual phy_if #(0))::get(this, "", "string", wr_cfg_h[0].phy_vif_0))
`uvm_fatal("VIF CONFIG","cannot get()interface vif from uvm_config_db. Have you set() it?")
wr_cfg_h[0].is_active = UVM_ACTIVE;
env_cfg.wr_cfg_h[0] = wr_cfg_h[0];
$display(" env_cfg.wr_cfg_h[0] %d", env_cfg.wr_cfg_h[0]);
end
begin
wr_cfg_h[0] = wr_agent_config::type_id::create( "mdio_cfg_h[0]");
if (!uvm_config_db #(virtual mdio_if )::get(this, "", "string", wr_cfg_h[0].mdio_vif))
`uvm_fatal("VIF CONFIG","cannot get()interface vif from uvm_config_db. Have you set() it?")
wr_cfg_h[0].is_active = UVM_ACTIVE;
env_cfg.wr_cfg_h[0] = wr_cfg_h[0];
$display(" env_cfg.wr_cfg_h[0] %d", env_cfg.wr_cfg_h[0]);
end
end
end
is it work?
that second get of env_cfg value will override or not?