RE: [sv-bc] Is an unnamed block with declarations a scope?

From: Michael McNamara <mcnamara_at_.....>
Date: Thu Aug 11 2005 - 21:05:50 PDT
A task call creates a scope in the region within which it is called, and in1364 you can refer to the variables of that task call (most usefully by examining the values in a waveform display).



 -----Original Message-----
From: 	Mark Hartoog [mailto:Mark.Hartoog@synopsys.com]
Sent:	Thu Aug 11 17:04:06 2005
To:	Michael McNamara; stuart@sutherland-hdl.com; sv-bc@eda.org
Subject:	RE: [sv-bc] Is an unnamed block with declarations a scope?

 
> Behalf Of Michael McNamara
> In my opinion the industry would have been better served if 
> the P1800 committee had introduced a protection qualifier for 
> variables, rather than delivering protection based on whether 
> the variable is declared in a block with a name or without a name.

I never thought the main reason for allowing variables in unnamed
blocks was to hide them. 

I just thought it was to make it more convenient to declare variables 
locally. In 1364 you are required to make up name for the block, 
even if you have no interest in ever making a hierarchical reference 
to the variable or looking at its value in a dump file. You are even 
required to name blocks in automatic scopes even though you cannot 
have a hierarchical reference to an automatic variable and automatic 
variables cannot appear in dump files.

Nothing in P1800 forces users to declare variables in unnamed blocks.
They are free to continue to name all the blocks in which variables
are declared, if they believe that improves the design process.

By the way, I couldn't understand your example very well, although
I think I know what you were trying to say. There weren't any 
declarations for a, b and c, so I am not sure what they were suppose
to be.

Mark Hartoog
700 E. Middlefield Road
Mountain View, CA 94043
650 584-5404
markh@synopsys.com 
Received on Thu Aug 11 21:06:04 2005

This archive was generated by hypermail 2.1.8 : Thu Aug 11 2005 - 21:06:48 PDT