RE: [sv-bc] Re: [sv-ec] No event triggers in functions?

From: Rich, Dave <Dave_Rich_at_.....>
Date: Wed Apr 26 2006 - 16:28:37 PDT
In Verilog, an event trigger would have to be a side effect because you
couldn't pass an event as argument to a function or have it be a return
value.

I believe the original restrictions for functions were aimed at reducing
the potential for side effects. That's why NBAs, procedural continuous
assignments, and output arguments were not allowed either. Functions can
be used in many non-procedural contexts where would be difficult to
predict or define the behavior of these side effects.

In SystemVerilog, and especially the testbench oriented features of the
language, we have many more uses for functions in procedural contexts
where it would be useful to relax these rules.

Dave


> -----Original Message-----
> From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
On
> Behalf Of Brad Pierce
> Sent: Wednesday, April 26, 2006 4:00 PM
> To: sv-ec@server.eda.org; sv-bc@server.eda.org
> Subject: [sv-bc] Re: [sv-ec] No event triggers in functions?
> 
> See also --
> 
>     http://boydtechinc.com/etf/archive/etf_2003/1982.html
>     http://www.boyd.com/1364_btf/report/full_pr/276.html
>     http://www.eda.org/sv-ec/hm/2933.html
> 
> -- Brad
> 
> -----Original Message-----
> From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
> Michael Burns
> Sent: Wednesday, April 26, 2006 3:22 PM
> To: sv-ec@eda.org; sv-bc@eda.org
> Subject: [sv-ec] No event triggers in functions?
> 
> 
> Hi folks,
> 
> The 1364-2005 draft 8 standard (the latest I've seen) states in
section
> 10.4.3 that functions cannot have any event triggers. Is this
> intentional? What's the rationale? Or, has it been worked on or
changed
> since that draft was released? It's not obvious to me what the issue
> would be - triggering an event doesn't block the triggering process,
nor
> 
> does it directly spawn any child threads. Triggering events from
> functions is something we would find it useful to be able to do.
> 
> Thanks,
> 
> Mike Burns
> Freescale Semiconductor, Inc.
Received on Wed Apr 26 16:28:44 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 26 2006 - 16:28:48 PDT