RE: [sv-ac] Contradictory statement of increment/decrement operators usage.

From: Havlicek John-R8AAAU <john.havlicek_at_.....>
Date: Thu Aug 06 2009 - 04:32:05 PDT
Hi Surya:
 
The intention is that for boolean expressions that are the building
blocks of sequences, the operators with side effects are not allowed (as
specified in 16.6.3).  However, for updating local variables in sequence
match items, such operators may be used.  This could be clarified with
an exception in 16.6.3 for sequence match items.
 
J.H.

________________________________

From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
Surya Pratik Saha
Sent: Wednesday, August 05, 2009 11:43 PM
To: sv-ac@server.eda.org
Subject: [sv-ac] Contradictory statement of increment/decrement
operators usage.


Hi,
In SV 2009 draft 7a LRM, it is mentioned:

16.6.3 Operators
All operators that are valid for the types described in 16.6.1 are
allowed with the exception of assignment operators and increment and
decrement operators. SystemVerilog includes the C assignment operators,
such as +=, and the C increment and decrement operators, ++ and --.
These operators cannot be used in expressions that appear in assertions.
This restriction prevents side effects.

However, BNF of sequence_match_item shows following rules:
sequence_match_item ::=
operator_assignment
| inc_or_dec_expression
| subroutine_call

Are they not contradictory?

-- 
Regards
Surya

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , 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 Aug 6 04:33:45 2009

This archive was generated by hypermail 2.1.8 : Thu Aug 06 2009 - 04:34:59 PDT