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

From: Rich, Dave <Dave_Rich@mentor.com>
Date: Thu Feb 23 2012 - 01:11:52 PST

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.
Received on Thu Feb 23 01:12:20 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 23 2012 - 01:12:38 PST