ISSUE 276

Number 276
Category errata
Synopsis A.6.4: BNF doesn't allow fork/join in functions
State lrmdraft
Class errata-simple
Arrival-DateJan 28 2003
Originator sharp@cadence.com
Release 2001b: A.6.4
Environment
Description
The BNF for function_statement does not allow fork/join
(par_block). However, fork/join is actually legal inside
functions. It isn't really needed, since there can't be
any delays, so a sequential block can be used instead.
But Verilog-XL allows it, and so does NC-Verilog.
Fix
In A.6.4,

REPLACE function_statement
WITH

function_statement ::= statement

plus a footnote that

"Function statements are limited by the rules of 10.3.4."

In A.6.2, REMOVE function_blocking_assignment.
In A.6.3 and Syntax 9-13, REMOVE function_seq_block.
In A.6.4, REMOVE function_statement_or_null.
In A.6.6 and Syntax 9-4, REMOVE function_conditional_statement.
In A.6.6 and Syntax 9-5, REMOVE function_if_else_if_statement.
In A.6.7 and Syntax 9-6, REMOVE function_case_statement.
In A.6.7 and Syntax 9-6, REMOVE function_case_item.
In A.6.8 and Syntax 9-7, REMOVE function_loop_statement.

In 10.3.4, REPLACE

"a) A function definition shall not contain
any time-controlled statements, that is,
any statements introduced with #, @, or wait."

WITH

"a) A function definition shall not contain
any time-controlled statements, that is,
any statements containing #, @, or wait."

and REPLACE

"f) A function shall not have any nonblocking
assignments"

WITH

"f) A function shall not have any nonblocking or
procedural continuous assignments."

and ADD the following rule --

"g) A function shall not have any event triggers."

Note that this issue supercedes #229
(which was controversial).
Audit-Trail
From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: Brad.Pierce@synopsys.com
Cc: etf-bugs@boyd.com
Subject: Re: errata/276: PROPOSAL - BNF A.6.4 doesn't allow fork/join in
functions
Date: Sun, 21 Sep 2003 15:58:32 +0300

While I like the general idea, a few more changes would be necessary:

- REMOVE function_blocking_assignment in A.6.2

- Add the following restrictions in 10.3.4:

* no intra-assignment delay and event controls (combine with 10.3.4(a))
* no event triggers (why not?)
* no disable statements (why not?)
* no procedural continuous assignments

Shalom


Brad.Pierce@synopsys.com wrote:

> In A.6.4,
>
> REPLACE function_statement
> WITH
>
> function_statement ::= statement
>
> plus a footnote that
>
> "Function statements are limited by the rules of 10.3.4."
>
> In A.6.3 and Syntax 9-13, REMOVE function_seq_block.
> In A.6.4, REMOVE function_statement_or_null.
> In A.6.6 and Syntax 9-4, REMOVE function_conditional_statement.
> In A.6.6 and Syntax 9-5, REMOVE function_if_else_if_statement.
> In A.6.7 and Syntax 9-6, REMOVE function_case_statement.
> In A.6.7 and Syntax 9-6, REMOVE function_case_item.
> In A.6.8 and Syntax 9-7, REMOVE function_loop_statement.
>
> http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&pr=276

--
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




From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: Brad.Pierce@synopsys.com
Cc: etf-bugs@boyd.com
Subject: Re: errata/276: PROPOSAL - BNF A.6.4 doesn't allow fork/join in
functions
Date: Tue, 30 Sep 2003 11:49:55 +0300

> [Note that intra-assignment delays and event controls
> are not possible without @ and #, and these are already
> disallowed by rule 10.3.4(a).]

Strictly speaking, 10.3.4(a) disallows "any statements introduced with #, @, or
wait".
It would not be unreasonable to claim that an intra-assignment delay or event
control
does not INTRODUCE a statement, rather they are in the middle of a statement.

Also, "disable" statements are not allowed in functions, though it is not clear
to me why.

> http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&pr=276

--
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




From: Shalom.Bresticker@motorola.com
To: Brad.Pierce@synopsys.com
Cc: etf-bugs@boyd.com
Subject: Re: errata/276: PROPOSAL - BNF A.6.4 doesn't allow fork/join in
functions
Date: Tue, 30 Sep 2003 12:11:31 +0300 (IDT)

> Also, "disable" statements are not allowed in functions,
> though it is not clear to me why.

My mistake: disables ARE allowed in functions.
The BNF fooled me because the productions are ordered in
"function_statement" differently than in "statement".

--
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


From: Shalom.Bresticker@motorola.com
To: Brad.Pierce@synopsys.com
Cc: etf-bugs@boyd.com
Subject: Re: errata/276: PROPOSAL - BNF A.6.4 doesn't allow fork/join in
functions
Date: Tue, 30 Sep 2003 12:31:20 +0300 (IDT)

How about changing "introduced with" to "containing"?

Shalom


> Strictly speaking, 10.3.4(a) disallows "any statements introduced with #, @, or
> wait".
>
> It would not be unreasonable to claim that an intra-assignment delay or event
> control does not INTRODUCE a statement, rather they are in the middle of a
> statement.

--
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


From: Steven Sharp <sharp@cadence.com>
To: etf-bugs@boyd.com, Shalom.Bresticker@motorola.com
Cc:
Subject: Re: errata/276: PROPOSAL - BNF A.6.4 doesn't allow fork/join in functions
Date: Tue, 30 Sep 2003 14:49:21 -0400 (EDT)

Just for reference, Verilog-XL does not allow intra-assignment event or delay
controls in functions. It also does not allow nonblocking assignments, even
without an explicit delay, since it treats them as having an implicit
intra-assignment #0 (and they actually have a delay to the NBA queue, so if
you disallow them with intra-assignment delays, it is consistent to disallow
them entirely).

Steven Sharp
sharp@cadence.com

Unformatted


Hosted by Boyd Technology