Hi there,
I’m a newer with the usage of system verilog “interface”.
Followings is my explanations and codes.
step 1. Define a interface as “IN_DATA_IF”.
step 2. Build a module “DATA_MODULE” that have a “IN_DATA_IF” listed in its i/o port
step 3. At top bench, I forget to instantiation “DATA_MODULE”.
And vcs shows [Error-[SV-UIP] Unconnected interface port, the port “data_if” of top-level module “DATA_MODULE” whose
type is interface IN_DATA_IF is left unconnected. It is illegal to leave the interface ports unconnected.
Please make sure that all interface ports are connected.]
step 4. instantiation “DATA_MODULE”. the error is pass.
/* ====================================== */
interface IN_DATA_IF
logic i_valid;
logic [11:0] i_data ;
endinterface: IN_DATA_IF
/* ====================================== */
/* ====================================== */
module DATA_MODULE (
input clk,
IN_DATA_IF data_if
);
.....
endmodule //DATA_MODULE
/* ====================================== */
module top_bench;
logic clk, rst;
IN_DATA_IF top_data_if;
//DATA_MODULE(.clk(clk)
// .data_if(top_data_if()
// );
endmodule //top_bench