Connecting multiple interface in tb top

Hey all, Hope you’re doing fine.
I’m trying to connect my dut instance that has three interfaces of the the same protocol (IF1 IF2 IF3) to vif ( VIF1, VIF2, VIF3). I don’t know how to connect one interface to another like IF 1 to VIF 1 and so on.

In reply to abdelaali_21:

Not sure if the VIF is your shared virtual interface using config_db or a different type of interface, anyway as long as they use the same interface type port used for the DUT like:


// DUT SIDE
interface if1(input bit clk);
endinterface

interface if2(input bit clk);
endinterface

interface if3(input bit clk);
endinterface

module col(if1 i1, if2 i2, if3 i3);
endmodule

// TESTBENCH SIDE
interface vif1(input bit clk);
endinterface

interface vif2(input bit clk);
endinterface

interface vif3(input bit clk);
endinterface

module top;
  // clock
  bit clk;
  
  // test interfaces
  if1 vi1(.clk(clk));
  if2 vi2(.clk(clk));
  if3 vi3(.clk(clk));
  
  // test interfaces
  // This will resul into an error due to type mismatch
//   vif1 vi1(.clk(clk));
//   vif2 vi2(.clk(clk));
//   vif3 vi3(.clk(clk));
  
  // DUT
  col uut(
    .i1(vi1),
    .i2(vi2),
    .i3(vi3)
  );
  
  // clock gen
  always #2 clk = ~clk;
  
  initial begin
    $dumpfile("dump.vcd");
    $dumpvars();
    #10;
    $finish();
  end
endmodule