Hi there, Here we are trying to use array of interfaces and specify modport. In case-1, we instantiate array of interfaces in the submodule and specify the modport list name in the top level module And in case-2, we instantiate the array of interface along with modport specified. So, could you please clarify which one would be the correct way? Thanks and Regards, -Anand *********************************************** * CASE 1: *********************************************** interface inf (); logic din; logic dout; modport x(output dout, input din); modport y(inout dout, inout din); endinterface: inf module sub(in, U1, out); input [1:0] in; output [1:0] out; inf U1 [2]; endmodule module top(in, out); input [1:0] in; output [1:0] out; inf U1 [2] (); sub inst_sub (.U1(U1.x),.in(in), out(out)); endmodule *********************************************** * CASE 2: *********************************************** interface inf (); logic din; logic dout; modport x(output dout, input din); modport y(inout dout, inout din); endinterface: inf module sub(in, U1, out); input [1:0] in; output [1:0] out; inf.x U1[2]; endmodule module top(in, out); input [1:0] in; output [1:0] out; inf U1 [2] (); sub inst_sub (.U1(U1), .in(in), out(out)); endmodule -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon May 25 05:10:50 2009
This archive was generated by hypermail 2.1.8 : Mon May 25 2009 - 05:11:50 PDT