RE: [sv-bc] Name resolution and imports

From: Warmke, Doug <doug_warmke_at_.....>
Date: Thu Aug 31 2006 - 17:18:31 PDT
After reading Mantis 1323, I agree with the Mentor/Cadence position.
(I'm not on the working group that has been meeting on this issue)

From a user's point of view, I would treat 1323 as two distinct items.


First, while it initially might seem attractive to hierarchically
reference a symbol imported from a package, it doesn't make
too much practical sense when you think about it.  What kinds of
symbols would you hierarchically refer to?  Typically variables
or functions.

And those actually live within the package scope, not the
scope into which they are being imported (As Neil points out).
Allowing hierarchical references to package items prefixed with
the importing scope is actually misleading.  It could lead users
to believe that multiple copies of a package item (e.g. a variable)
exist if more than one scope imports the same package item.

Other symbols one might refer to are type declarations or localparams.
There is no difficulty at all in directly referring to any such
symbol via the :: name resolution syntax.


Second, I don't approve of the chaining of symbol visibility
across nested package imports either.  This is a separate issue
from hiererachical references to package items.

I think that not allowing chained imports is actually helpful
to users.  It prevents surprising chains of dependency, and it
avoids namespace pollution that would occur if chaining were
allowed.  If package P wants to use symbols from package D in
its implementation, then symbols imported from package D shouldn't
automatically be added to package P's catalogue of visible symbols
(i.e. its "interface").  

Finally, this lack of chaining is consistent with VHDL rules.
I think that will help the intuitiveness of the language for
many users.


Regards,
Doug


> -----Original Message-----
> From: owner-sv-bc@server.eda.org 
> [mailto:owner-sv-bc@server.eda.org] On Behalf Of Vreugdenhil, Gordon
> Sent: Thursday, August 31, 2006 10:03 AM
> To: SV_BC List; SV_EC List; sv-ac@server.verilog.org
> Subject: [sv-bc] Name resolution and imports
> 
> All,
> 
> The name resolution working group has encountered an issue that
> needs to be resolved at the committee level.  The issue is directly
> addressed by Mantis 1323 -- "are imported names visible to
> hierarchical references".  Mentor and Cadence have both taken
> the position that they are not; Synopsys has taken the position
> that they are.  This needs to be resolved quickly as implementations
> have (and will continue) to diverge.  This also impacts the issue
> of chained imports (is a symbol imported into a package available
> for import) which is also addressed by Mantis 1323.
> 
> This issue has a direct bearing on back-annotation, pli, and
> related issues since it impacts what the system must present
> as members of a scope and whether hierarchical names for items
> in a design are unique or not.
> 
> Currently Mantis 1323 is listed as a BC issue.  I'd like to have
> this issue be resolved asap due to the overall impact of the
> interpretation differences.
> 
> Question:  should this immediately be elevated to the champions
> level or is it appropriate to leave for SV-BC?
> 
> Independent of that decision, it would be worthwhile for people
> to speak to this from various perspectives so that we can
> make an informed decision.
> 
> Gord
> -- 
> --------------------------------------------------------------------
> Gordon Vreugdenhil                                503-685-0808
> Model Technology (Mentor Graphics)                gordonv@model.com
> 
> 
Received on Thu, 31 Aug 2006 17:18:31 -0700

This archive was generated by hypermail 2.1.8 : Thu Aug 31 2006 - 17:18:41 PDT