[sv-bc] Re: [sv-ec] foreach iterates over unpacked arrays

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Tue Jan 17 2006 - 14:14:19 PST
This seems like an arbitrary, new restriction, not a bug fix.  Why
shouldn't foreach be used to iterate over the bits of a vector instead
of using a macro like the following?

`define FOREACH(A,I)                     \
  for (int I  = $left(A)                 \
      ;    I != $right(A)-$increment(A)  \
      ;    I +=          -$increment(A)  \
      )

-- Brad

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Steven Sharp
Sent: Tuesday, January 17, 2006 1:51 PM
To: sv-ec@eda.org; Dave_Rich@mentor.com
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:14:25 2006

This archive was generated by hypermail 2.1.8 : Tue Jan 17 2006 - 14:15:13 PST