RE: [sv-bc] Fwd: RE: 6.20.2 Value parameters - partially defined type - unpacked array

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Wed Aug 31 2011 - 04:19:58 PDT

'range' is indeed used in some places for both packed and unpacked dimensions.
In particular, in the BNF.

I think the type of top.uut2.p should be the type of tp, which is int[2].

Shalom

From: Daniel Mlynek [mailto:danielm@aldec.com.pl]
Sent: Wednesday, August 31, 2011 12:26 PM
To: Bresticker, Shalom
Cc: sv-bc@eda.org
Subject: Re: [sv-bc] Fwd: RE: 6.20.2 Value parameters - partially defined type - unpacked array

Thank you for the response.
So in those definition word "range" is used for bot packed and unpacked dimensions? I thought that it would be better to have unpacked addressed explicitly but ok.

Now I think that my example is legal and top.uut2.p shold be of type int T[2]; - am I right?

As for yours mantis 3287 i think it should be an error.

DANiel

On 8/31/2011 10:23 AM, Bresticker, Shalom wrote:
I think this example is probably well-defined.

However, note Mantis 3287, which points out a less clear case.

Shalom

From: owner-sv-bc@eda.org<mailto:owner-sv-bc@eda.org> [mailto:owner-sv-bc@eda.org] On Behalf Of Daniel Mlynek
Sent: Wednesday, August 31, 2011 11:04 AM
To: sv-bc@eda.org<mailto:sv-bc@eda.org>
Subject: [sv-bc] Fwd: RE: 6.20.2 Value parameters - partially defined type - unpacked array

In chapter 6.20.2 LRM defines how should be the type parameter if its type is not fully defined.
This description misses the unpacked array type parameters.
Lets assume situation where there is only unpacked dimension defined - like below how it shuld behave. IMHO LRM should add description for such cases and similar cases ie only singes and unpacked dim defined, only packed range and unpacked dimension defined etc...
typedef shortint T[2];
module name;
  parameter p[2]=T'{1,2}; //LRM do not describe how this case should work while BNF allows such code.
  initial $display("%p", p);
  initial $display("%b", p[0], p[1]);
endmodule

module top;
  parameter int tp[2]= '{1,-1};
  name #(tp)uut2();
endmodule
DANiel

--
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.
---------------------------------------------------------------------
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 Wed Aug 31 04:20:25 2011

This archive was generated by hypermail 2.1.8 : Wed Aug 31 2011 - 04:20:32 PDT