Jump to content

logie

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. The instance names should be tb_top.r_loop[0].my_if tb_top.r_loop[1].my_if and so on. Note that r_loop is used as a label in the generate loop.
  2. Yes. I would expect the my_if[0] input clk to be connected to the main_clk_array[0]. Are you seeing something else? By the way, since you are going with generates for the uvm_config_db call, you may also want to consider generates around the instantiation of the interface itself (instead of using array of interfaces). This might make your code a little simpler. Here is a possible solution, with generates around the instantiation and the config_db::set(). module tb_top(); import uvm_pkg::*; genvar i; generate for( i = 0; i < 3; i++) begin : r_loop test_if #(.MY_PARAM(4)) my_if (); initial begin $sformat(inst_name, "*.source[%0d].*",i); uvm_config_db#(virtual test_if#(.MY_PARAM(4)))::set(uvm_root::get(), inst_name, "vif", my_if); end end endgenerate   // run_test(); endmodule
  3. You need to instantiate an array of interfaces and not "virtual interfaces". I am assuming that you have an array of intefaces that you are trying to connect to an array of VIP masters/slaves. Your original code instantiating array of interfaces is correct. The problem appears to be resolving the my_if instance handle in the uvm_config_db::set() call. Try the following: uvm_config_db#(virtual test_if#(.MY_PARAM(4)))::set(uvm_root::get(), inst_name, "vif", tb_top.my_if); By the way, I dont have access to VCS. So let me know if this fixes your problem.
×
×
  • Create New...