Re: [sv-bc] Mantis 3230: static and automatic tasks and functions

From: John Michael Williams <jwill@BasicISP.net>
Date: Mon Nov 08 2010 - 10:13:39 PST

Hi Shalom.

"static" in C++ also implies that the variable has file scope.
Another possible confusion.

On 11/07/2010 04:03 AM, Bresticker, Shalom wrote:
> Way back in Verilog-2001, almost a decade ago, the LRM talked about
> "static" and "automatic" tasks and functions. For example, 1364-2001
> section 10.2.1 says,
> "Tasks without the optional keyword automatic are static tasks, with all
> declared items being statically allocated. These items shall be shared
> across all uses of the task executing concurrently. Task with the
> optional keyword automatic are automatic tasks. All items declared
> inside automatic tasks are allocated dynamically for each invocation.
> Automatic task items can not be accessed by hierarchical references.
> Automatic tasks can be invoked through use of their hierarchical name."
> Many people got used to that terminology.
> Then the SystemVerilog LRM hijacked the terminology to classes with a
> different meeting and was even brazen enough to accuse the older parts
> of the LRM of misusing the terminology.
> 8.9 in 1800-2009, for example, now says,
> "A static method is different from a task with static lifetime. The
> former refers to the lifetime of the method within the class, while the
> latter refers to the lifetime of the arguments and variables within the
> task.
> *class *TwoTasks;
> *static task *t1(); ... *endtask *// static class method with automatic
> variable lifetime
> *task static *t2(); ... *endtask *// ILLEGAL: nonstatic class method
> with static variable lifetime
> *endclass*"
> The similarity of the two syntaxes increases the confusion, and was a
> bad choice in my opinion.
> It is probably too late to change the syntax or the terminology in the
> clause on Classes, but it will require a lot of rewriting to change the
> terminology everywhere else, and "static task" is certainly much more
> convenient to say than "task with static variable lifetime".
> Shalom
> Shalom Bresticker
> Intel LAD DA, Jerusalem, Israel
> +972 2 589 6582 (office)
> +972 54 721 1033 (cell)
> http://www.linkedin.com/in/shalombresticker
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.

-- 
         John Michael Williams
         jwill@BasicISP.net
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Nov 8 09:01:34 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 08 2010 - 09:04:06 PST