RE: [sv-ec] foreach iterates over unpacked arrays

From: Rich, Dave <Dave_Rich_at_.....>
Date: Tue Jan 17 2006 - 14:38:20 PST
Yes, there are good reasons. Packed objects are usually dealt with as a
whole (integral) expression and we are usually trying to iterate over
the elements we can't operate on as a whole. If we iterated over the
packed dimension, we would always be iterating bit-by bit.

Also, foreach was added primarily for iterating over dynamically sized
array dimensions, and especially associative array dimensions, where
there is no other way to iterate.

And also, foreach should match functionally with the semantics of random
constraints, which want to iterate stopping at integral values.

Dave


> -----Original Message-----
> From: Steven Sharp [mailto:sharp@cadence.com]
> Sent: Tuesday, January 17, 2006 1:51 PM
> To: sv-ec@eda.org; Rich, Dave
> Subject: Re: [sv-ec] foreach iterates over unpacked arrays
> 
> 
> >From: "Rich, Dave" <Dave_Rich@mentor.com>
> 
> >The LRM does not explicitly say the foreach statement iterates of
> unpacked
> arrays and not packed arrays. The wording suggests that, but could be
made
> stronger. Mantis 1306 added with proposal.
> 
> And is there some technical reason why a foreach statement shouldn't
be
> allowed to iterate over packed dimensions?
> 
> Steven Sharp
> sharp@cadence.com
Received on Tue Jan 17 14:38:36 2006

This archive was generated by hypermail 2.1.8 : Tue Jan 17 2006 - 14:39:00 PST