ISSUE 380

Number 380
Category errata
Synopsis 12.1.3: should allow tasks/functions in generate loops
State lrmdraft
Class errata-discuss
Arrival-DateJul 09 2003
Originator sharp@cadence.com
Release 2001b: 12.1.3
Environment
Description
Section 12.1.3 says that task and function declarations
are not allowed in a generate loop. There is no reason
to restrict this. I can only assume that people saw no
need for having a task or function be repetitively declared
because they assumed all callers could share a single
function. This reasoning is faulty, since it assumes that
all of the tasks or functions would be equivalent. This
is not necessarily the case. The declarations of the
task or function in different instances of a loop could
be different because of different genvar values. For
example, different instances of a generate loop might
create vectors of increasing width in each instance,
requiring a function of corresponding width for each
instance. Or you might have nothing but function
declarations in the generate loop, generating families
of functions that operate on different widths. There
may be other situations where this is useful as well.

I don't see any benefit to this restriction, and it
prevents some potentially useful constructs. The
restriction should be removed.
Fix
In 12.1.3, paragraph 8, delete the phrase
", however not in a generate loop" from the sentence:

"Task and function declarations shall also be permitted
within the generate scope, however not in a generate loop."
Audit-Trail

From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/380: should allow tasks/functions in generate loops
Date: Thu, 10 Jul 2003 11:20:31 +0300

Steven brought this up in July 1999 in
http://boydtechinc.com/btf/archive/btf_1999/0663.html ,
but there does not seem to have been any discussion of it.

I also found that this restriction was introduced into the draft wording of this
section during July 1998,
originally it was not there, but I did not find any discussion why this was
done.

Shalom


Fix replaced by Shalom.Bresticker@motorola.com on Thu Nov 13 08:37:31 2003
In 12.1.3, paragraph 8, delete the phrase
", however not in a generate loop" from the sentence:

"Task and function declarations shall also be permitted
within the generate scope, however not in a generate loop."

Unformatted


Hosted by Boyd Technology