Subject: RE: [sv-bc] Separate Compilation Meeting Monday 6/9/03
From: Peter Flake (Peter.Flake@synopsys.com)
Date: Thu Jun 19 2003 - 10:40:11 PDT
Jay,
Surely this could be achieved by import into $root? Then it would apply to
all modules.
BTW the difference I see between namespace and module is that the former
may not have instantiations or always/initial blocks.
Peter.
At 13:03 19/06/2003 -0400, Jay Lawrence wrote:
>Adam,
>
>The import statement is outside the module so it can be used in the
>Ansi-style ports. Imagine a module
>
> module types:
>
> typedef T ....
> endmodule
>
> import types;
> module foo (input T t);
> endmodule
>
>Jay
>
> > -----Original Message-----
> > From: Adam Krolnik [mailto:krolnik@lsil.com]
> > Sent: Thursday, June 19, 2003 11:01 AM
> > To: Randy Misustin
> > Cc: sv-bc@eda.org
> > Subject: Re: [sv-bc] Separate Compilation Meeting Monday 6/9/03
> >
>
> >
> > You write that you expected import statements to only affect
> > the next module. If
> > this is so, then why not place the import statements inside
> > the modules like software
> > languages do. Clearly this simplifies the import requirements
> > because the statement
> > is already in the proper scope. Having the statement outside
> > a module would only
> > have value when it would apply to all modules of a given file.
> >
> > For example, without namespaces, etc. we use an include file
> > to contain standard
> > functions that designers use. For each module they want, they
> > include the file
> >
> > module foo (...);
> >
> > `include "stdfunc.vh";
> >
> > ...
> >
> > endmodule
> >
> > I guess the real power of this proposal is:
> >
> > 1. The 'import' statement giving the user control over what
> > names are brought
> > into their module.
> >
> > 2. The ability to import a signal from another module and
> > give it a local name.
> > (like an alias as you mentioned.)
> >
> > Anything other new abilities?
> >
> > If we are proposing to allow people to specify which names
> > come into their module,
> > should we allow a user to rename the element soas to not
> > conflict with something else
> > they may have? I.e. consider what would happen if one needed
> > to import functionality
> > from 2 sources and there is a name conflict. To use a Perl form:
> >
> > use MyPkg1 {send_trans => pkg1_send_trans,
> > receive_trans => pkg1_receive_trans};
> >
> > use MyPkg2 {send_trans => pkg2_send_trans,
> > receive_trans => pkg2_receive_trans};
> >
> >
> >
> > Adam Krolnik
> > Verification Mgr.
> > LSI Logic Corp.
> > Plano TX. 75074
> >
> >
> >
> >
This archive was generated by hypermail 2b28 : Thu Jun 19 2003 - 10:49:26 PDT