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

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Fri Feb 17 2006 - 12:23:11 PST
Cliff,

That's not at all what I asked.  I don't see anything wrong with using
fork-join in functions.

INSTEAD, I asked Dave, who started this thread, why so many people are
asking him the question in his subject line.  My guess is that they are
indeed seeing examples of this style and then asking Dave, "is that
really legal?".

Yes, it's really legal.

How might they be seeing examples of this legal usage?  Maybe the people
that are asking him are tool developers who are getting bug reports
about this legal usage, in which case the need for backward
compatibility would be even stronger.  It would be interesting to know.

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Clifford E. Cummings
Sent: Friday, February 17, 2006 12:01 PM
To: sv-bc@eda.org
Subject: [sv-bc] Can a function contain a fork/join/any/none?

Hi, All -

Just the sv-bc on this message (I'm tired of getting two of everyone 
of these messages)

Brad asked the question and I think Stu hinted around the question:

What is the use-model for adding fork-join to a function?

Are there any engineers doing this? (And has anybody slapped them for 
doing it?  :-) )

The engineers that ask this question, do they understand that no 
delays are allowed in a function (not even #0 delays or nonblocking 
assignments that cause events to be scheduled in later event regions 
within the same timestep) and that fork-join are generally not 
synthesizable and are really most useful when you add some form of 
delay to the forked paths within a testbench?

I can't say for sure, but I don't believe either Stu or I have ever 
shown engineers a fork-join in a function in training and I don't 
think we ever intend to teach this coding style.

I understand that it might be important to add some form of 
clarification to the LRM but whatever clarification we add should 
come with the strong editorial comment that this is/was a bad idea.

I will support whatever the group goes for on this and then I will 
never teach an engineer to add fork-join to a function (unless 
somebody can come up with some ultra-astonishing use-model that I 
have not heretofore recognized).

Regards - Cliff

----------------------------------------------------
Cliff Cummings - Sunburst Design, Inc.
14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
Phone: 503-641-8446 / FAX: 503-641-8486
cliffc@sunburst-design.com / www.sunburst-design.com
Expert Verilog, SystemVerilog, Synthesis and Verification Training
Received on Fri Feb 17 12:23:20 2006

This archive was generated by hypermail 2.1.8 : Fri Feb 17 2006 - 12:23:25 PST