RE: propose limitation of $root declarations


Subject: RE: propose limitation of $root declarations
From: David Smith (david_smith@avanticorp.com)
Date: Tue Aug 14 2001 - 15:27:23 PDT


It seems that your fundamental problem is not a language
definition problem but a tool problem. If you had an
easy ability to browse and locate definitions in the
source (as well as directory location) then it would be
less of an issue. This is a quite common problem in software
(C/C++) where globals are defined.

While I "feel" your pain and can clearly understand it
I would prefer to see a consistent definition. The $root
is either a module or something very different. If it is
a module then it should be similar to any other module
body. If not then it can have a completely different
set of rules as you suggest.

I think the ability to inheret connections from a parent
module without any indication that this is occurring is
quite dangerous. After thinking about it some more I guess
I would prefer to have to indicate that a connection to
a scope outside of the module is being made. In C/C++ this
is done (although there is not nested scoping) using an
"extern". In this case then there would still be scoping at
the module definition level with nested definitions. The
ability to connect between levels is either through the module
header or by means of an extern. No unintended side effects.

Some thoughts at least. I would be interested in other
responses as well.

David
David W. Smith
Architect

> Avant! Corporation
9205 SW Gemini Drive
Beaverton, OR 97008

Voice: 503.520.2715
FAX: 503.643.3361
Email: david_smith@avanticorp.com
http://www.avanticorp.com

-----Original Message-----
From: Stefen Boyd [mailto:stefen@boyd.com]
Sent: Monday, August 13, 2001 11:57 AM
To: vlog-pp@eda.org
Subject: propose limitation of $root declarations

I would like to see the removal of some of the stuff
currently allowed outside of the scope of a module
boundary. I am not opposed to the visibility
for nested modules, but because of the
definition of the source deck in verilog, global
signals, tasks, functions, etc. in $root can be placed
anywhere and thus are HARD to find.

Ok, so I've been burned. I lost several hours trying
to find several parts of a superlog verification
environment because there were many pieces scattered
in unlikely locations... almost at random. It was
clear that it had been put together in a hurry, and
that any new signals were simply added to the file
that was open in the editor at the time... in some
of the most non-intuitive locations.

PROPOSAL:
Remove some of the stuff that can be placed into
$root. Remove the following from the
<declaration_or_statement> used by <source_text>

<task_declaration>
<function_declaration>
<interface_instantiation>
<event_declaration>
<net_declaration>
<data_declaration>
<statement>

Granted, this might mean we'll need a <root_declaratoin_or_statement>
but throwing this stuff around in the global space is
more painful to maintain than it's worth. I am open
to allowing task and function declarations, but I really
don't want to get global net, variable, or interface instantiations.

We might want to be able to import a module, to get it's declarations,
tasks, and functions, but then we know what we're getting and
some idea of where to look for the stuff we got... for the poor fool
who comes along later and has to maintain a horrid beast of
the past.

Regards,
   Stefen

--------------------
Stefen Boyd Boyd Technology, Inc.
stefen@BoydTechInc.com (408)739-BOYD
www.BoydTechInc.com (408)739-1402 (fax)



This archive was generated by hypermail 2b28 : Tue Aug 14 2001 - 15:28:48 PDT