Subject: Re: [sv-ec] Legal use of an inside_expression
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Tue Sep 02 2003 - 18:57:00 PDT
Neil,
The BNF is correct. The "inside" operator should be available anywhere in
the language, not just in constraints. The BNF was written to allow "inside"
in any expression. Therefore, it is legal to write:
if ( foo inside { [16:23] , [32:47] } ) ... ;
Not only that, but this construct is synthesizable so there's no reason why
it should be limited to constrains.
The description of the inside operator should be added to the "Operators and
Expressions" section. Currently, it's semantics are described only in the
constraints
sections, but that is simply due to historical reasons.
Arturo
----- Original Message -----
From: "Neil Korpusik" <Neil.Korpusik@sun.com>
To: <sv-ec@eda.org>
Sent: Tuesday, September 02, 2003 4:21 PM
Subject: [sv-ec] Legal use of an inside_expression
Hi Brad,
I had a question on the SV3.1 BNF.
It was my understanding that an "inside_expression" was intended to only be
used within constraint blocks. The BNF seems to indicate that an
inside_expression can be used anywhere that an expression is allowed.
A.8.3 Expressions
expression::=
primary
|unary_operator{attribut_instance}primary
| inc_or_dec_expression
| ( operator_assignment )
| expression binary_operator { attribute_instance } expression
| conditional_expression
| string_literal
| inside_expression
inside_expression ::= expression inside range_list_or_array
Could you clarify this?
Neil
This archive was generated by hypermail 2b28 : Tue Sep 02 2003 - 19:00:54 PDT