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

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

Hi Shalom.

I read that (6.21) as saying that the qualifier must be part of the
declaration of the task, function, or block per se, not on the
module declaration.

It doesn't make sense to me, semantically, to permit a design
module to be "automatic": On which stack should it be pushed?
How could it be popped?

A design module should be a structural part of a design; calling
it "automatic" seems self-contradictory.

Bresticker, Shalom wrote:
> Hi,
>
> 6.21 says,
> "An optional qualifier can be used to specify the default lifetime of all variables declared in a task, function, or block defined within a module, interface, package, or program. The lifetime qualifier is automatic or static."
>
> So a is automatic.
>
> Regards,
> Shalom
>
> ________________________________
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Daniel Mlynek
> Sent: Thursday, February 11, 2010 12:22 PM
> To: sv-bc@eda.org
> Subject: [sv-bc] changing the lifetime of begin end block
>
> LRM1800-2009 adds new statement to the desc of module header:
> "The module header defines the following: - The default lifetime (static or automatic) of subroutines defined within the module"
>
> My questiion is if default lifetime for module should be deafult only for subroutines declared inside such module or also to block declared in this module - see below example:
>
> module automatic top;
> bit clk;
> initial repeat (10) #10 clk = ~clk;
> always @(clk)
> begin
> int a = 0; //<<<<this variable should be static or atuomatic???
> $display(a);
> a++;
> end
> endmodule
> ---------------------------------------------------------------------
> 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.
>

-- 
         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 17:01:43 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 11 2010 - 17:01:55 PST