Re: [sv-bc] changing the lifetime of begin end block

From: John Michael Williams <jwill@BasicISP.net>
Date: Thu Feb 11 2010 - 21:21:54 PST

Hi Steven.

A variable not on a stack is NOT "automatic". Whether a keyword
was used on it or not -- if it can not be deallocated AUTOMATICALLY
because of exit of some process or thread, it is not an automatic
variable.

I think there is a confusion here over what "automatic" means.
The LRM has to be modified, if this is a real confusion, rather
than just a confusion during this discussion.

For another example, what if I declared,

"integer unsigned I;" ?

Would the keyword make an integer "unsigned"? No,
because an integer is defined as a 32-bit variable
having a sign bit as its MSB.

A conforming compiler should report an error if
it encountered "module automatic mod1;" just
as it should "integer unsigned I;"

Steven Sharp wrote:
> Note that in most cases, variables outside of tasks and functions don't
> need to use automatic storage. There cannot be multiple activations of the
> scope except in certain circumstances involving fork..join_any/join_none
> inside loops. An implementation might try to optimize the other cases by
> treating them as statics regardless of how they were declared. They might
> go too far and allow hierarchical references to them as if they were static,
> exposing this treatment. That would be a faulty optimization, but would
> not necessarily indicate that these variables are not otherwise treated as
> automatics.
>
> If you really want to test whether these variables default to automatic,
> you should write a testcase that creates multiple simultaneous activations
> of the scope, and see whether each gets its own storage.
>
> Steven Sharp
> sharp@cadence.com
>
>

-- 
         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 Thu Feb 11 21:12:28 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 11 2010 - 21:12:36 PST