1

I'm trying to connect DUT's port list with interface by using bundling. The current problem is that the DUT was implemented with lots of ports. It's almost 1500 more.

I want to connect a partial bundle interface such as i2c interface, ahb interface, axi interface, etc., to DUT().

As you can see below, I made some example.

module myDesign ( 
 input clk,
 input data,
 input   i2c_clk,
 output  i2c_data,
 input     ahb_clk,
 output    ahb_data,
 input       axi_clk,
 output      axi_data
 ...
 //over 1500+ ports..
 ...
);
 ...
endmodule

//I made partial interface 
interface i2c_interface;
 logic i2c_clk;
 logic i2c_data;
endinterface

interface ahb_interface;
 logic ahb_clk;
 logic ahb_data;
endinterface

module tb;
...
i2c_interface i2c_if;
ahb_interface ahb_if;

// I want implement to interface bundle 
myDesign u_myDesign ( .*,?); //<=== How Can I connect partial interface by bundling in valid way?
endmodule

For your understanding, I also made an example at EDA playground: https://www.edaplayground.com/x/khdC

toolic
  • 5,637
  • 5
  • 20
  • 33
Carter
  • 581
  • 2
  • 6
  • 23

1 Answers1

2

You can not simply connect an interface to the DUT port list because the port types must match between the module definition and the module instantiation. I think you are asking if something like this is possible:

myDesign u_myDesign ( i2c_if, ahb_ih );

That is illegal because the myDesign module does not have ports of type i2c_interface and ahb_interface.

If you have the option to modify the myDesign module, then you could add ports of that type inside the module:

module myDesign ( 
 input clk,
 input data,
 i2c_interface i2c_if,
 ahb_interface ahb_if,
 ...
);

If you can not change the DUT, then you must make individual connections, as you have shown in the EDA playground link:

  adder DUT (
    .a(i_i2c_intf.a),
    .b(i_i2c_intf.b),
    .c(i_i2c_intf.c),
    .a0(i_axi_intf.a0),
    .b0(i_axi_intf.b0),
    .c0(i_axi_intf.c0),

Refer to IEEE Std 1800-2017, section 25. Interfaces.

toolic
  • 5,637
  • 5
  • 20
  • 33