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.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Feb 11 02:32:14 2010
This archive was generated by hypermail 2.1.8 : Thu Feb 11 2010 - 02:32:18 PST