RE: [sv-ac] Is 'let' allowed as constant expression

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Thu Feb 23 2012 - 01:18:07 PST

Specifically, constant_primary includes constant_let_expression, which is defined as a let_expression with the following restriction:

44) In a constant_let_expression, all arguments shall be constant_expressions and its right hand side shall be a
constant_expression itself provided that its formal arguments are treated as constant_primary there.

Regards,
Shalom

> -----Original Message-----
> From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
> Rich, Dave
> Sent: Thursday, February 23, 2012 11:12 AM
> To: Surya Pratik Saha; sv-ac@eda.org
> Subject: RE: [sv-ac] Is 'let' allowed as constant expression
>
> I don't think it is needed. The LRM says "Semantic checks are performed
> to verify that the expanded let body with the actual arguments is
> legal"
>
> I believe this means that all restrictions that would apply to the
> expanded expression are handled after expansion of the let body. It's
> almost like a macro.
>
>
> Dave
>
>
> -----Original Message-----
> From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
> Surya Pratik Saha
> Sent: Thursday, February 23, 2012 12:06 AM
> To: sv-ac@eda.org
> Subject: [sv-ac] Is 'let' allowed as constant expression
>
> Hi,
> Is 'let' construct allowed to be used in context of constant
> expression?
> For e.g.:
>
> module top;
> let l(int x) = x;
> reg [l(1): 0] r;
> endmodule
>
> I did not see any reference in the LRM agreeing or disagreeing it. If
> it is allowed, then I think we need to put some restriction on those
> usages like constant function call as discussed in the LRM. Please
> share your comments.
>
> --
> Regards
> Surya
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, 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.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Feb 23 01:19:38 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 23 2012 - 01:19:43 PST