BTF - BE07 - Section 14.5.11 - timing_check problems

From: Clifford E. Cummings (cliffc@europa.com)
Date: Thu Jun 05 1997 - 09:52:03 PDT


Subject: BTF - BE07 - Section 14.5.11 - timing_check problems

Behavioral Task Force - Errata Submission
Assigned Enhancement Request Number: BE07
Enhancement Name (Description): Section 14.5.11 - timing_check problems
Date Submitted: 970505
Requestor: graham@compass-da.com
        (Paul Graham)

Status: Submitted (priority not yet assigned)

Errors found in the Verilog LRM (IEEE 1364-1995).

?. Section 14.5.11. The syntax for timing check condition

    timing_check_condition ::=
        scalar_expression
        | ~scalar_expression
        | scalar_expression == scalar_constant
        | scalar_expression === scalar_constant
        | scalar_expression != scalar_constant
        
has many problems. First, the syntax given in the syntax box in section
14.5.11 is different from that given in Annex A. The syntax in Annex A
includes an extra choice:

        | expression !== scalar_constant

And why does section 14.5.11 use "scalar_expression" while Annex A uses
"expression"? Which is correct?

Second, the syntax is ambiguous. Given the code

    $setup(a, posedge b &&& ~c, 10);

is the expression "~c" to be interpreted as the first alternative,
"scalar_expression", or as the second alternative, "~scalar_expression".
Either interpretation is possible. Similarly, in

    $setup(a, posedge b &&& c == 1, 10);

the expression "c == 1" can be interpreted as either the first choice
or the fifth choice.

Note that the examples given in section 14.5.11 avoid this ambiguity:

    $setup(data, posedge clk &&& (~clr), 10);

Here expression "(~clr)" can only be interpreted as "scalar_expression", not
as "~scalar_expression". Why? Because the syntax for "~scalar_expression"
does not allow enclosing parentheses.

I think the syntax for timing_check_condition could be better written:

    timing_check_condition ::=
        scalar_expression
        
This supports the apparent intent of the actual syntax, and it allows all
the examples given in section 14.5.11.

(Note: Perhaps the syntax given in 14.5.11 is intended more as a suggested
usage pattern than as a linguistic definition.)
//********************************************************************//
// Cliff Cummings E-mail: cliffc@europa.com //
// Sunburst Design Phone: 503-579-6362 / FAX: 503-579-7631 //
// 15870 SW Breccia Dr., Beaverton, OR 97007 //
// //
// Verilog & Synthesis Training / On-Site Training //
// Verilog, VHDL, Synopsys, LMG, FPGA, Consulting and Contracting //
//********************************************************************//



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