RE: [sv-bc] confusion in determining the type of an self determined binary expression during evalution of type operator

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Wed Oct 17 2007 - 03:32:45 PDT
Yulik, 

> Regarding the normalization of the array bounds, it is 
> important not to normalize the bounds only if the language is 
> extended to support selects on arbitrary expressions (which I 
> really hope will happen one day).
> Consider the following code:
> 
> logic a [4:1][3:1];
> logic b [3:1];
> logic c;
> assign b = a[3];
> assign c = b[i];
> 
> A software tool (or even a human person) may decide to 
> simplify the above code by replacing the reference to "b" 
> with the logic driving it
> ("a[3]"):
> 
> assign c = (a[3])[i];
> 
> The type of the expression in parenthesis should have the 
> bounds [3:1], not the normalized [2:0], otherwise the 
> selection will not work as expected. 

This seems to me to be a special case, where you could do that
substitution. It would be sufficient for b to be declared as 

logic b [2:0];  OR
logic b [5:3];  OR
logic b [1:3];

for this substitution not to work.

Shalom
---------------------------------------------------------------------
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 Oct 17 03:35:30 2007

This archive was generated by hypermail 2.1.8 : Wed Oct 17 2007 - 03:35:49 PDT