Thanks Brad. I'll do any minor revisions yet that I need to include and upload that on Thurs/Friday. Gord. Brad Pierce wrote: > Gord, > > Attached is a slightly modified version of your proposal, mostly > bolding, to use if/as you wish. > > By the way, the following comment in package p3 didn't seem right to me -- > > p1::x and q are made available from p2 > > -- Brad > > ------------------------------------------------------------------------ > From: Vreugdenhil, Gordon [mailto:gordon_vreugdenhil@mentor.com] > Sent: Friday, September 15, 2006 10:11 PM > To: Brad Pierce; sv-bc@eda-stds.org > Cc: Vreugdenhil, Gordon > Subject: RE: [sv-bc] Re: Package export proposal > > > > If someone is willing to suggest actual wording in > terms of the semantics, I could incorporate these. > > I am not willing to just drop in "local" due to > concerns I've raised before. Issues related to > the interaction of "local" with enclosed imports > must be resolved. I think that this should wait > until we have consensus on the actual form of export > and any suggested import changes before dealing > with local. I strongly support the introduction > of local but don't think it can just be added without > consideration of various issues. I am not willing > to spend the time on that until we have an agreed > on proposal for import and export. > > Dropping in the unqualified import/export (no ::), > has a larger non-local impact in other sections of > the LRM. I'd prefer to leave that as a separate > item so that someone else can do that part. Again, > if someone wants to provide the specific change, > I'd be willing to incorporate that. > > Gord. > > > -----Original Message----- > From: owner-sv-bc@server.eda.org on behalf of Brad Pierce > Sent: Fri 9/15/2006 9:52 PM > To: sv-bc@server.eda-stds.org > Subject: RE: [sv-bc] Re: Package export proposal > > Gord's most recent version is attached. > > Some important suggestions that have been made so far are -- > > Allow the 'local' qualifier in package declarations > > http://www.eda-stds.org/sv-bc/hm/5069.html > > Allow the :: suffix to be omitted from package imports and exports > > http://www.eda-stds.org/sv-bc/hm/5096.html > > Typographical and wordsmithing issues can be fixed up later. > > -- Brad > > > -----Original Message----- > From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of > Gordon Vreugdenhil > Sent: Thursday, September 14, 2006 3:17 PM > To: Gordon Vreugdenhil > Cc: SV_BC List; SV_EC List; sv-ac@verilog.org > Subject: [sv-bc] Re: Package export proposal > > I just caught a minor BNF bug in the proposal -- I missed the vertical > bar when I added the "export *::*;" rule. I fixed the typo and uploaded > the modified version. > > Gord. > > > Gordon Vreugdenhil wrote: > > > I've uploaded an initial cut at the export proposal and attached it to > > > Mantis 1323 as a placeholder. > > http://www.verilog.org/svdb/bug_view_page.php?bug_id=0001323 > > See the attached package_exports.htm. > > > > I think that I've managed to incorporate all the changes suggested > > from within the sub-group. If anyone sees errors or omissions, please > > > let me know. > > > > I have not yet included the "local" declaration change since I need to > > > hear some feedback as to whether there need to be semantic > > restrictions on the general case. > > > > Gord. > > -- > -------------------------------------------------------------------- > Gordon Vreugdenhil 503-685-0808 > Model Technology (Mentor Graphics) gordonv@model.com > > > ------------------------------------------------------------------------ > > In A.1.10 > > package_item ::= > package_or_generate_item_declaration > | anonymous_program > | package_export_declaration > | timeunits_declaration > > In Syntax 19-1 > > package_item ::= > package_or_generate_item_declaration > | anonymous_program > | package_export_declaration > | timeunits_declaration > > In A.2.1.3 Type declarations > > package_export_declaration ::= > export *::*; > | export package_import_item { , package_import_item } ; > > > After 19.2.2, insert new section > > 19.2.3 Exporting imported names from packages > > > > > > package_export_declaration ::= > export *::*; > | export package_import_item { , package_import_item } ; > > > > > > > > > Syntax 19-3—Package export syntax (excerpt from Annex A) > > > By default, declarations imported into a package are not visible by way > of subsequent imports of that package. Package export declarations > allow a package to specify that imported declarations are to be made > visible in subsequent imports. > > > Wildcard Package Exports > > An export of the form package_name::* exports all declarations that were > actually imported from package_name within the context of the exporting > package. All names from package_name, whether imported directly or > through wildcard imports, are made available. Symbols that are > candidates for import but not actually imported are not made available. > The special wildcard export form, export *::*; , exports all imported > declarations from all packages from which imports occur. > > Direct Package Exports > > An export of the form package_name::name makes the given declaration > available. It shall be an error if the given declaration is not a > candidate for import or if the declaration is not actually imported in > the package. If the declaration is an unreferenced candidate for > import, the export shall be considered to be a reference and shall > import the declaration into the package following the same rules as for > a direct import of the name. > > Imports of exported declarations > > An import of a declaration made visible through an export is equivalent > to an import of the original declaration. Thus direct or wildcard > import of a declaration by way of multiple exported paths does not cause > conflicts. > > Multiple exports of the same declaration > > It is valid to specify multiple exports that export the same actual > declaration. > > > Examples: > > > > package p1; > > int x,y; > > endpackage > > > > > > package p2; > > import p1::x; > > export p1::*; // exports p1::x as the name "x"; > > // p1::x and p2::x are the same declaration > > endpackage > > > > package p3; > import p1::*; > export p2::*; > > int q = x; > > // p1::x and q are made available from p2. Although p1::y > > // is a candidate for import, it is not actually imported > > // since it is not referenced. Since p1::y is not imported, > > // it is not made available by the export. > endpackage > > > > > package p4; > > import p1::*; > > export p1::*; > > int y = x; // y is available as a direct declaration; > > // p1::x is made available by the export > > endpackage > > > > package p5; > > import p4::*; > > export p1::x; // p1::x is visible since it is exported > > // from p4. > > export p4::x; // p4::x refers to the same declaration > > // as p1::x so this is legal. > > endpackage > > > > package p6; > > import p1::*; > > export p1::x; > > int x; // Error. export p1::x is considered > to > > // be a reference to "x" so a subsequent > > // declaration of x is illegal. > > endpackage > > > > package p7; > > int y; > > endpackage > > > > package p8; > > import p7::y; > > import p1::x; > > export *::*; // Exports both p7::y and p1::x. > > endpackage > > > > module top; > > import p2::*; > > import p4::*; > > int y = x; // x is p1::x > > endmodule > > > > > > [Note to editor: Please update the numbers of Syntax 19-3, Syntax 19-4 > and Syntax 19-5 to Syntax 19-4, Syntax 19-5 and Syntax 19-6.] > > > > > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Wed Sep 20 07:20:43 2006
This archive was generated by hypermail 2.1.8 : Wed Sep 20 2006 - 07:20:48 PDT