ISSUE 63

Number 63
Category errata
Synopsis Grammar ambiguity in delay_or_event_control
State closed
Class duplicate
Arrival-DateDec 03 2001
Originator Daryl Stewart
Release 2001b
Environment

Description
A grammatical ambiguity can arise in assignments which include the production

delay_or_event_control expression

since

delay_or_event_control ::=
delay_control
| event_control
| repeat ( expression ) event_control

delay_control ::=
# delay_value
| # ( mintypmax_expression )

delay_value ::=
unsigned_number
| parameter_identifier
| specparam_identifier
| mintypmax_expression

mintypmax_expression ::=
expression
| expression : expression : expression

Which allows, for example,
nonblocking_assignment ::= variable_lvalue <= [ delay_or_event_control ] expression
to produce
variable_lvalue <= # expression expression

EG
l <= # a | b | c;
may be parsed as equivalent to:
l <= #(a) ((| b) | c));
or:
l <= #(a | b) (| c);

A solution is to define

delay_control ::=
# unsigned_number
| # parameter_identifier
| # specparam_identifier
| # ( mintypmax_expression )

Which forces delays given as expressions to be parenthesised, as is common practice.
Fix
Fixed by issue 174.
Audit-Trail
Unformatted

Hosted by Boyd Technology