Re: BTF B08 - Implicit sensitivity

From: Stefen Boyd (stefen@boyd.com)
Date: Mon Jan 11 1999 - 14:17:25 PST


At 03:57 PM 1/11/99 -0500, Tom Fitzpatrick wrote:

<p>BAD MSG:
>Hi Stephen,

>>Example 4:
>>always @* begin // equivalent to @(a or b or c or d)
>> x = a ^ b;
>> always @* // equivalent to @(c or d)
>> x = c ^ d;
>>end
>
>Can't have a nested always. This would have to be:
>
>always @* begin
> x = a ^ b;
> @*
> x = c ^ d;
>end
>
>Equivalent to:
>
>always @(a or b or c or d)
> x = a ^ b;
> @(c or d)
> x = c ^ d;
>end
X-Lines: 35
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1552
X-Status: $$$$
X-UID: 0000000788
Status: RO

Exactly what I intended to write. The corrected proposal:

9.7.5 Implicit event_expression list

The event_expression list of an event control is a common source of bugs in rtl simulations. Users tend to forget to add some of the nets or registers read in the timing control statement. This is often found when comparing rtl and gate level versions of a design. The implicit event_expression, @*, is a convenient shorthand that eliminates these problems by adding all nets and registers which are read by the statement (which can be a statement group) of a procedural_timing_control_statement to the event_expression.
All net and register identifiers which appear in the statement will be automatically added to the event expression with these exceptions:
        Identifiers which only appear in wait or event
expressions.
Identifiers which only appear on the left hand side of
assignments.

Nets and registers that appear on the right hand side of assignments, in function and task calls, or case and conditional expressions will all be included by these rules.

Example1:
always @(*) // equivalent to @(a or b or c or d or f)
  y = (a & b) | (c & d) | myfunction(f);

Example 2:
always @* begin // equivalent to @(a or b or c or d or tmp1 or tmp2)
    tmp1 = a & b;
    tmp2 = c & d;
    y = tmp1 | tmp2;
  end

Example 3:
always @* begin // equivalent to @(b)
  @(i) foo = b; // i is not added to @*
end

Example 4:
always @* begin // equivalent to @(a or b or c or d)
  x = a ^ b;
  @* // equivalent to @(c or d)
    x = c ^ d;
end



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:53:25 PDT and
sponsored by Boyd Technology, Inc.