In my testbench there are a couple of pcie_agents which have the different lanes. I extended my own class from the pcie VIP. Something like :
class mt_pcie_agent#(int INST=0) extends pcie_agent((INTS==0)?2:(INTST==1)?4:(INST==2)?8:16);//different lanes by instance.
...
endcase
Now I want to put them into queue in my env.
class mt_env extend uvm_env;
...
mt_pcie_agent rc_agent[$:8];
...
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
...
for(int i=0; i<`NUM_RC; i++) begin //`NUM_RC = 1~8
case (i)
0: begin
rc_agent.push_back(mt_pcie_agent#(0)::type_id::create($sformatf("rc%0d_agent",i), this);
end
1: begin
rc_agent.push_back(mt_pcie_agent#(1)::type_id::create($sformatf("rc%0d_agent",i), this);
end
...
endcase
...
endfunction
...
endclass
It's okay for VCS to compile these code. But since mt_pcie_agent#(0)
is a different type from mt_pcie_agent#(1)
, I wonder whether if these code has some side-effects in run-timing?
Any help is appreciated.