Question: in this code above in one of the comment, how do you connect to the DUT instance?
module testbench; .... environment_if env_if(serial_clk); .....
dut i_dut(...);
genvar eng_idx
generate
for(eng_idx=0; eng_idx<`NUM_OF_ENGINES; eng_idx++) begin env_if.eng_if[eng_idx].serial_bit = assign i_dut.engine[eng_idx].serial_bit; end
endgenerate ......
initial begin
env_if.eng_virtual_if = env_if.eng_if[0:NUM_OF_ENGINES-1]; //now possible to iterate over eng_virtual_if[] for(int eng_idx=0; eng_idx<
NUM_OF_ENGINES; eng_idx++)
uvm_config_db#(virtual serial_if)::set(null, "uvm_test_top.env", "tx_vif", env_if.env_virtual_if[eng_idx]);
end
endmodule
Thank you.