[sv-bc] Fwd: RE: Slice with unpacked arrays


Subject: [sv-bc] Fwd: RE: Slice with unpacked arrays
From: Karen Pieper (Karen.Pieper@synopsys.com)
Date: Mon Feb 03 2003 - 09:05:34 PST


>From: "David W. Smith" <david.smith@synopsys.COM>
>To: "'Srouji, Johny'" <johny.srouji@intel.com>
>Cc: <Karen.Pieper@synopsys.COM>
>Subject: RE: Slice with unpacked arrays
>Date: Mon, 3 Feb 2003 08:39:59 -0800
>X-Mailer: Microsoft Outlook, Build 10.0.4510
>Importance: Normal
>
>Actually the answer from Rich that you included was not directly related to
>the question in the latest email you included.
>
>David
>
>David W. Smith
>Synopsys Scientist
>
>Synopsys, Inc.
>Synopsys Technology Park
>2025 NW Cornelius Pass Road
>Hillsboro, OR 97124
>
>Voice: 503.547.6467
>Main: 503.547.6000
>FAX: 503.547.6906
>Email: david.smith@synopsys.com
>http://www.synopsys.com
>
>
>
>-----Original Message-----
>From: Srouji, Johny [mailto:johny.srouji@intel.com]
>Sent: Sunday, February 02, 2003 12:04 AM
>To: David W. Smith
>Cc: Karen.Pieper@synopsys.COM
>Subject: RE: Slice with unpacked arrays
>
>
>Hi David,
>
>You mentioned this was still an open item to be resolved by sv-bc. It seems
>that Dave Rich answered your question. Is this accurate? I have put this in
>our agenda anyway, as we need to review Dave Rich proposal.
>
>Thanks,
>
>--- Johny.
>
>
>-----Original Message-----
>From: David W. Smith [mailto:david.smith@Synopsys.COM]
>Sent: Tuesday, January 14, 2003 3:03 AM
>To: 'Dave Rich'
>Cc: Srouji, Johny; Karen.Pieper@Synopsys.COM; 'sv-ec'; sv-bc@eda.org
>Subject: RE: Slice with unpacked arrays
>
>So, seems like a syntactical error in the example in the LRM.
>
>The question we were raising was to make sure that it is legal to take a
>slice of a non-packed array such as an array of strings. Seems like it is.
>
>Regards
>David
>
>
>
>
>-----Original Message-----
>From: Dave Rich [mailto:David.Rich@Synopsys.COM]
>Sent: Monday, January 13, 2003 4:48 PM
>To: David W. Smith
>Cc: johny.srouji@intel.com; Karen.Pieper@Synopsys.COM; 'sv-ec';
>sv-bc@eda.org
>Subject: Re: Slice with unpacked arrays
>
>
>I was just about to file a clarification to the sv-bc for this. :-)
>
>Section 4.2 allows unpacked slices to be copied. When used with an
>unpacked array, the curly '{}' braces refer to an array literal, not a
>concatenation. A concatenation is an integral expression. A slice
>inside an array literal is just a copy operation.
>
>The last example in section 4.4 needs to be corrected to show the
>declarations and because you can't have parenthesis '()" around an
>unpacked array slice.
>
>Replace:
>int i = bitvec[j +: k]; // k must be constant.
>a = {(b[c -: d]), e}; // d must be constant
>
>with:
>int i = bitvec[j +: k]; // k must be constant.
>int a[x:y], b[y:z], e;
>a = {b[c -: d], e}; // d must be constant
>
>
>David W. Smith wrote:
>
> > Greetings,
> > The issue came up in todays SV-EC meeting about the use of slices with
> > unpacked arrays. All of the examples in 3.0 were with packed data. Was
>
> > it intended that unpacked data could be used as well?
> >
> > It is not clear in Section 4.4 which is supported. The first paragraph
> > refers to packed array or integer type. There are additional
> > references to both packed and unpacked. The example we want to verify
>is:
> >
> > string d[5:1] = { "a", "b", "c", "d", "e" };
> > string p[*];
> > p = { d[1:3], "hello", d[4:5] };
> >
> > which would result in: "a" "b" "c" "hello" "d" "e"
> >
> > Is the use of the slice legal?
> >
> > Regards
> > David
> >
> > David W. Smith
> > Synopsys Scientist
> >
> > * *
> >
> > *Synopsys, Inc.*
> > Synopsys Technology Park
> > 2025 NW Cornelius Pass Road
> > Hillsboro, OR 97124
> >
> > Voice: 503.547.6467
> > Main: 503.547.6000
> > FAX: 503.547.6906
> > Email: david.smith@synopsys.com <mailto:david.smith@synopsys.com>
> > _http://www.synopsys.com_ <http://www.synopsys.com/>
> >
> >
>
>
>--
>--
>Dave Rich
>Principal Engineer, CAE, VTG
>Tel: 650-584-4026
>Cell: 510-589-2625
>DaveR@Synopsys.com



This archive was generated by hypermail 2b28 : Mon Feb 03 2003 - 09:06:19 PST