Auto-increment proposal with example


Subject: Auto-increment proposal with example
From: Karen Pieper (Karen.Pieper@synopsys.com)
Date: Mon Jan 06 2003 - 17:16:30 PST


Hi, all,
        Here is the wording we discussed today with an example added. I'd
appreciate any feedback by Wednesday evening at 5pm. I'll incorporate it,
and we can then vote.

Thanks,

K

Increment decrement proposal:

In Section 7.3:

REPLACE: SystemVerilog also includes the C incrementor and decrementor
operators ++i, --i, i++ and i-- (provided there is no timing control). These
can be used in expressions without parentheses. These increment and
decrement operations behave as blocking assignments.

WITH: SystemVerilog also includes the C incrementor and decrementor
operators ++i, --i, i++ and i-- (provided there is no timing control). These
can be used in expressions without parentheses. These increment or
decrement operations behave as blocking assignments.

<new paragraph>
The ordering of assignment operations relative to any other operation
within an
expression is undefined. An implementation may warn whenever a variable
is both
written and read-or-written within an integral expression or in other contexts
where an implementation cannot guarantee order of evaluation. Consider the
following
example:

        i = 10;
        j = i++ + (i = i - 1);

After execution, the value of j can be 18, 19, or 20 depending upon the
relative ordering
of the increment and the assignment statements.



This archive was generated by hypermail 2b28 : Mon Jan 06 2003 - 17:18:39 PST