[sv-bc] import p::*


Subject: [sv-bc] import p::*
From: Francoise Martinolle (fm@cadence.com)
Date: Thu Jan 29 2004 - 09:27:57 PST


The LRM is not clear on the semantics of the p::*.
Somebody from my group read the LRM and from his reading he implied that
the p::*
will import everything in the package except if there is already a explicit
declaration
of the same name.
The LRM extract is:
Copyright 2003 Accellera. All rights reserved.269
A wildcard import makes each identifier within the package a candidate for
import. Each such identifier is imported only when it is neither declared
nor explicitly imported into the scope. Similarly, a wildcard import of an
identifier is overridden by a subsequent declaration of the same identifier
in the same scope.

I though that the interpretation (also suggested by the example below the
table where it is said that it "forces the import") was that the package
declaration items are candidate for import,
and are only imported if there is a simple reference to that declaration
item. This was my understanding of what was intended.

for example:
import p::*;
module top;
// nothing from package p is imported
endmodule

import p::*
module top;
reg r = p::c; // nothing from package p is imported, p::c is a hierarchical
reference
endmodule

import p::*;
module top
reg r = c; // c and only c from package p is imported.
endmodule

can you please let me know which interpretation is correct and fix the
wording if necessary.



This archive was generated by hypermail 2b28 : Thu Jan 29 2004 - 09:34:21 PST