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

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Sun Nov 07 2010 - 04:03:20 PST

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, and is
believed to be clean.
Received on Sun Nov 7 04:04:31 2010

This archive was generated by hypermail 2.1.8 : Sun Nov 07 2010 - 04:07:20 PST