Re: [sv-bc] Why no 'output' continuous assignments from a function call?

From: Steven Sharp <sharp@cadence.com>
Date: Thu Nov 04 2004 - 12:25:40 PST

>According to 10.3, "it shall be illegal to call a function with
>output ... arguments ... in an expression that is not within
>a procedural statement." This means that a function call can
>drive at most one continuous assignment, and, for example,
>
> assign a = f(y, b);
>
>would be illegal for
>
> function f(input y, output b);

Even if it were legal, this would not be a continuous assignment to b.
The returning of a function output argument value is defined to be a
*procedural* assignment. So you would not have two continuous assignments;
you would have a continuous assignment that did a procedural assignment
as a side-effect of evaluation. Having side-effects violates the
desire for continuous assignments to behave like combinational logic.
We can't eliminate the pre-existing ability to have side-effects, but
we don't have to allow new mechanisms for it.

Steven Sharp
sharp@cadence.com
Received on Thu Nov 4 12:25:44 2004

This archive was generated by hypermail 2.1.8 : Thu Nov 04 2004 - 12:26:05 PST