Re: [sv-bc] Clarify -- questions about enumeration types

From: Greg Jaxon <Greg.Jaxon@synopsys.com>
Date: Tue Jun 22 2004 - 22:19:13 PDT

Steven Sharp wrote:
> Dave,
>
> I think your answer resolved my question about structs nicely. Their field
> names don't need to be imported into the local scope when a struct type or
> variable gets imported, because a reference to them is regarded like a
> hierarchical reference into the subscope "inside" the struct. I should have
> realized that myself.
>
> So it appears that importing a name only imports that name itself, and
> that this does not cause a problem for structs.
>
> However, this still leaves the issue with enum literals. One would expect
> that importing an enum type would provide access to the enum literals also.
> It would be very inconvenient to have to import all of the literal names
> individually. From what you have said, VHDL makes a special exception for
> these.

Packages arise from the need to merge large, incompatible design sources.
These situations have name conflicts - especially for simple identifiers like
TRUE and FALSE, RED, GREEN, and BLUE, etc.

If I am faced with two types processor::truth_value and memory::BOOL,
that have to coexist in some interface, getting an error when I import
them both is not helpful. THEIR names don't conflict.
The interface might not even need processor::FALSE and memory::FALSE
which caused the second import to fail.

So JMHO: Use a separate syntax to import auxilary names without having to list them all.

Greg Jaxon

>
> Steven Sharp
> sharp@cadence.com
>
>
Received on Tue Jun 22 22:19:16 2004

This archive was generated by hypermail 2.1.8 : Tue Jun 22 2004 - 22:20:39 PDT