ISSUE 88

Add Proposal  Add Analysis  Edit Class, Environment, or Release
Number 88
Category errata
Synopsis 9.7.2 should say that event_controls can be expressions
State open
Class errata-discuss
Arrival-DateJul 31 2002
Originator Steven Sharp <sharp@cadence.com>
Release 2001b, 9.7.2, 9.7.4
Environment

Description
9.7.2 says an event control is a "value change on a net or
variable".

It should add that an event control can also be an
expression. In that case, the execution is triggered by a
change in the value of the expression. However, if an
operand of the expression changes, but not the value of the
entire expression, then execution is not triggered.

Add an example.
Add an example in 9.7.4.

See
http://boydtechinc.com/etf/archive/etf_2002/0058.html
http://boydtechinc.com/etf/archive/etf_2002/0059.html
Fix

Audit-Trail

From: Shalom.Bresticker@motorola.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/88: 9.7.2 should say that event_controls can be expressions
Date: Thu, 1 May 2003 13:09:58 +0300 (IDT)

> 9.7.2 says an event control is a "value change on a net or
> variable".
>
> It should add that an event control can also be an
> expression. In that case, the execution is triggered by a
> change in the value of the expression. However, if an
> operand of the expression changes, but not the value of the
> entire expression, then execution is not triggered.

Does the LRM say EXPLICITLY anywhere that in any of the cases where it waits for
a change in the value of an expression, then the expression is re-evaluated only
when the value of one of the operands changes, but not if only the result value
of a function changes?

That is, in @(f(A)), the @ is triggered only if A changes.
But if f(A) changes without a change in A, then nothing happens.

For example, 6.1 "Continuous Assignments", says both,
"This assignment shall occur whenever the value of the right-hand side changes."

and in 6.1.2,
"whenever an operand in the right-hand side expression changes value, the whole
right-hand side shall be evaluated and if the new value is different from the
previous value, then the new value shall be assigned to the left-hand side."

That is liable to be misunderstood.
I did not succeed in finding a clear statement that function values are not
continuously re-evaluated, but only when an input argument changes value.

What happens when an operand which is a net changes strength, but not value?

The cases I thought of where all this is relevant are:

- continuous assignment (regular, procedural, and force)
- @()
- wait statement
- $monitor
- port connections

Are there others?


From: Steven Sharp <sharp@cadence.com>
To: etf-bugs@boyd.com, Shalom.Bresticker@motorola.com
Cc:
Subject: Re: errata/88: 9.7.2 should say that event_controls can be expressions
Date: Thu, 1 May 2003 18:17:34 -0400 (EDT)

> Does the LRM say EXPLICITLY anywhere that in any of the cases where it waits
for
> a change in the value of an expression, then the expression is re-evaluated
only
> when the value of one of the operands changes, but not if only the result
value
> of a function changes?

That is how it works, but I don't think it says so explicitly in the LRM.


> I did not succeed in finding a clear statement that function values are not
> continuously re-evaluated, but only when an input argument changes value.

And it gets more complicated than that.

It might get evaluated when an operand in an expression used as an input
argument changes, even though the input argument value doesn't change.

It might get evaluated when nothing in its input arguments changed, but it
appears in a more complex expression with other operands that changed.

It might not be evaluated even if its input argument changed, if it comes
after an event-or with another value that changed, so that it is not
necessary to evaluate it to know that the block has triggered. The same
may apply to combinations with other short-circuiting operators.

It might or might not get evaluated if variables in the expression changed
values and then changed back again immediately (zero-width glitches, which
are often created by code that tries to avoid inferring latches by assigning
a default value at the start).

It will probably get evaluated again when the event control is reached again,
to determine the new "current value" to wait for it to change away from.

It seems unlikely that any implementation evaluates the expressions unless
at least one operand somewhere in the event control changed value at least
temporarily, but I could be wrong.

Any attempted clarification will need to be worded carefully to avoid
invalidating existing implementations.

The best way to get reliable behavior is to use functions that depend only
on their inputs and have no side effects.

> What happens when an operand which is a net changes strength, but not value?

That may be implementation-dependent too.


> The cases I thought of where all this is relevant are:
>
> - continuous assignment (regular, procedural, and force)
> - @()
> - wait statement
> - $monitor
> - port connections
>
> Are there others?

Delay expressions on primitives and nets, which don't have to be constant,
in which case they have to be re-evaluated whenever they might have changed.

Steven Sharp
sharp@cadence.com


From: Shalom.Bresticker@motorola.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/88: 9.7.2 should say that event_controls can be expressions
Date: Tue, 2 Sep 2003 12:41:29 +0300 (IDT)

Solve issue 308 together with this.

Shalom


> 9.7.2 says an event control is a "value change on a net or
> variable".
>
> It should add that an event control can also be an
> expression. In that case, the execution is triggered by a
> change in the value of the expression. However, if an
> operand of the expression changes, but not the value of the
> entire expression, then execution is not triggered.
>
> Add an example.
> Add an example in 9.7.4.
>
> See
> http://boydtechinc.com/etf/archive/etf_2002/0058.html
> http://boydtechinc.com/etf/archive/etf_2002/0059.html


From: Shalom.Bresticker@motorola.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/88: 9.7.2 should say that event_controls can be expressions
Date: Fri, 5 Sep 2003 11:50:33 +0300 (IDT)

Together with this, I would like to add mention that a transition between
x and z is also considered a value change (and on the RHS of a continuous
assignment) and also that it is not specified whether an event control
is triggered at time 0.

--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478

Unformatted

Hosted by Boyd Technology