I am doing a scenario which has two DUTS of same ports but with different names,so here i am instantiating the same agent twice and trying to set_config object of the two instances of virtual interface but it is throwing build error to unable to find the virtual in the driver?
In reply to syed taahir ahmed:
Can you show the code you used to set and get the virtual interface? as well as the code used to set the name of the driver (either create or new)?
`ifdef S2P2_TOP
s2p2_vif_container_t s2p2_vif_container_h;
`else
s2p2_sw2_vif_container_t s2p2_sw2_vif_container_h;
`endif
vector_vif_container_t vector_vif_container_h;
`ifdef S2P2_TOP
if(!get_config_object("s2p2_vif_container_h", dummy, 0)) begin
uvm_report_error("build", "no virtual interface available");
end
else begin
if(!$cast(s2p2_vif_container_h, dummy)) begin
uvm_report_error("build", "virtual interface is incorrect type");
end
else begin
s2p2_virtual_vif_h = s2p2_vif_container_h.m_vif_h;
end
end
`else
if(!get_config_object("s2p2_sw2_vif_container_h", dummy, 0)) begin
uvm_report_error("build", "no virtual interface available");
end
else begin
if(!$cast(s2p2_sw2_vif_container_h, dummy)) begin
uvm_report_error("build", "virtual interface is incorrect type");
end
else begin
s2p2_virtual_vif_h = s2p2_sw2_vif_container_h.m_vif_h;
end
end