There can be four different types of port connections in SytemVerilog as follows:
(1) Using positional port connections. The one shown in your link code. The ports are mapped as per position in the instantiated module.
(2) Using named port connections. This is a verbose declaration. The position of ports does not matter. An example can be as follows. Note that the position can now be interchanged.
mymodule u1 (.data(data), .address(address));
// Is same as follows:
mymodule u1 (.address(address), .data(data));
(3) Using new SystemVerilog .name implicit port connections. Whenever the port name and size matches the connecting net or bus name and size, the ports get connected. This is not a widely used technique.
// Searches for address and data sized variables in current module
mymodule u1 (.address, .data);
(4) Using new SystemVerilog .* implicit port connections. whenever the port name and size matches the connecting net or bus name and size, the ports are connected.
reg [2:0] address;
reg [15:0] data;
// Connect address data automatically. Provided the name is same.
mymodule u1 (.*);
So, in your case, the following are equivalent. Since the name of interface instances like input_intf
, output_intf
, and mem_intf
are same, the .*
connection shall also work.
testcase TC (.mem_intf(mem_intf),.input_intf(input_intf),.output_intf(output_intf));
testcase TC (.output_intf(output_intf),.mem_intf(mem_intf),.input_intf(input_intf));
testcase TC (.*);
For more information, refer to CummingsDesignCon2005_SystemVerilog_ImplicitPorts paper.