Re: [sv-bc] Proposal to make it easier to use packages with port declarations

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Wed May 10 2006 - 10:22:52 PDT
Brad Pierce wrote:

> Jonathan offers some nuanced opinions about packages and compilation
> scopes in
> 
>    http://www.eda.org/sv-bc/hm/3282.html
> 
> Also note that if you want to share user-defined types between two
> different compilation unit scopes then, according to the IEEE standard,
> you need to use packages, because if you simply `include the type
> declaration in those two scopes, you will be creating two different
> types.  

"Different" is a word to use carefully.  Some "different" types
are matching so "different" doesn't necessarily mean that the
difference is observable.  Certainly for things such as unpacked
structs or class declarations "different" does mean "not assignable"
and is certainly an observable effect.  Since various rules use
"matching", "equivalent", or "assignable", you must be careful in
this area since "different" isn't meaningful.


Gord

 > For legacy reasons (from before packages were added to SV), the
> multiple-`include style probably still works with many tools, but it's
> not really forward compatible with the IEEE standard.
> 
> -- Brad
> 
> -----Original Message-----
> From: Bresticker, Shalom [mailto:shalom.bresticker@intel.com] 
> Sent: Wednesday, May 10, 2006 9:45 AM
> To: Brad Pierce; sv-bc@eda.org
> Subject: RE: [sv-bc] Proposal to make it easier to use packages with
> port declarations
> 
> So is the idea of compilation unit scope declarations bad?
> 
> Shalom
> 
> 
>>-----Original Message-----
>>From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
> 
> On
> 
>>Behalf Of Brad Pierce
>>Sent: Wednesday, May 10, 2006 7:39 PM
>>To: sv-bc@server.eda.org
>>Subject: Re: [sv-bc] Proposal to make it easier to use packages with
>>port declarations
>>
>>Just as I would like my functions to be pure (instead of referring to
>>global variables), I would like my module declarations to be as
>>insensitive to context as possible.
>>
>>-- Brad
>>
>>-----Original Message-----
>>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
>>Bresticker, Shalom
>>Sent: Wednesday, May 10, 2006 12:10 AM
>>To: sv-bc@eda.org
>>Subject: RE: [sv-bc] Proposal to make it easier to use packages with
>>port declarations
>>
>>One thing is still not clear to me.
>>
>>I understood that importing the package into the compilation unit
> 
> scope
> 
>>would work, except that some people don't like that idea.
>>
>>My question is, once the concept of compilation unit scopes has been
>>accepted and is part of the standard, why continue by assuming or
>>desiring that it not be used?
>>
>>Thanks,
>>Shalom
> 
> 
> 

-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com
Received on Wed May 10 10:22:49 2006

This archive was generated by hypermail 2.1.8 : Wed May 10 2006 - 10:22:54 PDT