RE: [sv-ec] Re: [sv-bc] Can a function contain a fork/join/any/none?

From: Stuart Sutherland <stuart_at_.....>
Date: Thu Feb 16 2006 - 18:42:28 PST
Also germane to this thread is the statement in 1800-2005 10.7 that states:

"The only statements allowed inside a final block are those permitted inside
a function declaration."

When considering what is/is not allowed or useful in functions, we need to
also consider final blocks.

Just to add my $0.02, I do not think fork-join of any flavor should be
allowed in functions/always_comb/final.  Perhaps from a the theoretical
point of view, some forms of fork-join can be justified, but are they useful
in a code block that must execute instantly?  I suggest that fork-join or
all types be disallowed in functions.  It is fully backward compatible with
Verilog, and I doubt there is any SV code that does it.  Let's close the
barn door before the animals get out.

Stu
~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland
stuart@sutherland-hdl.com
+1-503-692-0898
  

> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On 
> Behalf Of Brad Pierce
> Sent: Thursday, February 16, 2006 2:38 PM
> To: sv-ec@eda.org
> Subject: [sv-ec] Re: [sv-bc] Can a function contain a 
> fork/join/any/none?
> 
> Likewise, if there are reasons to continue to allow fork...join
> in functions, then those would presumably apply to always_comb also.
> 
> -- Brad
> 
> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Steven Sharp
> Sent: Thursday, February 16, 2006 12:16 PM
> To: ambar.sarkar@paradigm-works.com; sv-ec@eda.org; sv-bc@eda.org;
> Dave_Rich@mentor.com
> Subject: [sv-bc] RE: [sv-ec] Can a function contain a
> fork/join/any/none?
> 
> Another data point from 11.2:
> 
> "Statements in an always_comb shall not include those that block, have
> blocking timing or event controls, or fork...join statements"
> 
> Much of the reason that functions are not allowed to block is 
> that they
> can be called from combinational logic like continuous assignments and
> always_comb.  Since the reasons are similar, the restrictions should
> presumably be similar also.  If there are reasons to disallow
> fork...join
> in always_comb, then those would presumably apply to functions also.
> 
> Steven Sharp
> sharp@cadence.com
> 
> 
> 
Received on Thu Feb 16 18:42:36 2006

This archive was generated by hypermail 2.1.8 : Thu Feb 16 2006 - 18:43:15 PST