79334946

Date: 2025-01-07 05:31:58
Score: 2
Natty:
Report link

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.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (1): how do you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: user2498830