RE: [sv-bc] import p::*


Subject: RE: [sv-bc] import p::*
From: Steven Sharp (sharp@cadence.com)
Date: Fri Jan 30 2004 - 15:40:09 PST


>A hierarchical reference does NOT bring anything into existence. The
hierarchical reference is only valid if the identifier was
>already brought into existing in the scope to which the reference is made. If c
is used within top and its definition comes from
>package p then top.c is a legal hierarchical reference. If c is in package p
and package p is imported into top but there is no use
>of c in top then top.c is illegal.

This is clearly obscure and dangerous.

The legality of a hierarchical reference then depends, not on whether there
was an import declaration or an object declaration, but on whether you happen
to have referenced the object in the target module. If someone comments out
a reference, and it happens to be the last one in the module, the hierarchical
reference mysteriously stops resolving to it.

And note that this will not necessarily produce a clean warning to let you
know. It may be able to resolve to another object further up in the design
hierarchy with the same name. So if you happen to remove the last local
reference to an object, your design mysteriously starts behaving differently.

Steven Sharp
sharp@cadence.com



This archive was generated by hypermail 2b28 : Fri Jan 30 2004 - 15:46:31 PST