[sv-bc] RE: Specifying modport on array of interfaces..

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Mon May 25 2009 - 05:43:42 PDT
At first glance, I think this is the same issue from http://www.eda-stds.org/sv-bc/hm/9058.html ?

Shalom

________________________________
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On Behalf Of Anand Gurusamy
Sent: Monday, May 25, 2009 3:04 PM
To: sv-bc@server.eda.org
Cc: Arun Maity; Girish Ravunnikutty; Kapil Kaushik
Subject: [sv-bc] Specifying modport on array of interfaces..

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<http://www.mailscanner.info/>, and is
believed to be clean.
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon May 25 05:46:40 2009

This archive was generated by hypermail 2.1.8 : Mon May 25 2009 - 05:47:34 PDT