RE: [sv-ec] Reversed unpaced array slice

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Mon May 28 2012 - 06:43:50 PDT

I can think of a few reasons not to do so:

1. consistency with packed arrays

2. unpacked arrays are probably frequently stored in memory like packed arrays, which makes referencing them in reverse order much more computationally expensive than in declaration order.

3. clarity, avoiding mixups

Shalom

From: Radoslaw Nawrot [mailto:Radoslaw.Nawrot@aldec.com.pl]
Sent: Monday, May 28, 2012 16:19
To: Bresticker, Shalom; sv-ec@eda.org
Subject: RE: [sv-ec] Reversed unpaced array slice

Thanks,
Using streaming operators is a good idea,but don't You think that LRM should permint such operation on unpacked array because unpacke dmemory representation. Using in reversed order fragment of nonreversed (packed) memorywords shoudl be usefull.

Radek
________________________________
From: Bresticker, Shalom [mailto:shalom.bresticker@intel.com]<mailto:[mailto:shalom.bresticker@intel.com]>
Sent: Monday, May 28, 2012 2:58 PM
To: Radoslaw Nawrot; sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: RE: [sv-ec] Reversed unpaced array slice
No.

I am not sure whether this is explicitly stated, though.

However 11.5.1 says with respect to packed arrays,

A non-indexed part-select is given with the following syntax:

vect[msb_expr:lsb_expr]

Both msb_expr and lsb_expr shall be constant integer expressions. Each of these expressions shall be evaluated in a self-determined context. The first expression shall address a more significant bit than the second expression.

11.4.14.2 shows how the order can be reversed using the streaming operators.

Shalom

From: owner-sv-ec@eda.org<mailto:owner-sv-ec@eda.org> [mailto:owner-sv-ec@eda.org]<mailto:[mailto:owner-sv-ec@eda.org]> On Behalf Of Radoslaw Nawrot
Sent: Monday, May 28, 2012 15:45
To: sv-ec@eda.org<mailto:sv-ec@eda.org>
Subject: [sv-ec] Reversed unpaced array slice

Hi, I have a question about unpacked array slices:
example code:

bit b [7:0];
initial $display(b[0:3]);

Can I use reversed array slice (or whole reversed array b[0:7] ) ?
I didn not found any explicity example or paragraph in LRM.

Thanks in advance,
Radek

--
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 Mon May 28 06:45:39 2012

This archive was generated by hypermail 2.1.8 : Mon May 28 2012 - 06:45:41 PDT