RE: EXTERNAL: Re: [vhdl-200x] VHDL 2008 : std_logic_textio package

From: Jones, Andy D <andy.d.jones@lmco.com>
Date: Thu Sep 19 2013 - 13:59:24 PDT
A reference to IEEE packages using an IEEE prefix is consistent with other IEEE packages (e.g. numeric_std_unsigned & numeric_std), which also declare library IEEE.

However, I believe this is counterproductive. In general, units that reference packages expected to reside in the unit's own library should reference those packages with a work prefix. This provides portability for testing/renaming libraries (e.g. ieee_proposed), to avoid duplicate library names, with no changes to the library files themselves.

This is what 'work' was created for in the first place! The units themselves should contain no dependency on what their own library is called.

Therefore, I suggest changing all IEEE packages that reference IEEE packages to reference those packages using the work prefix, instead of the IEEE prefix, and to remove the "library IEEE;" statement.


Andy D Jones
Electrical Engineering
Lockheed Martin Missiles and Fire Control
Dallas TX





From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] On Behalf Of David Koontz
Sent: Saturday, September 14, 2013 6:35 PM
To: vhdl-200x@eda.org
Subject: EXTERNAL: Re: [vhdl-200x] VHDL 2008 : std_logic_textio package


On 15 Sep 2013, at 8:16 AM, chuck and teril swart <chuckterilswart@gmail.com<mailto:chuckterilswart@gmail.com>> wrote:


In my opinion, the best solution, and the one most compatible with existing implementations is to
change the default library declarations in 13.2 to read something like:
"Every design unit except a context declaration and package STANDARD is assumed to contain the following implicit context items as part of its context clause:
library STD, WORK, IEEE; use STD.STANDARD.all;"
Are there problems with this solution? Maybe. First, will package std_logic_1164 compile? Its the first package in library IEEE and maybe library IEEE doesn't exist until after this package compiles. I don't think that this is a real problem.

As long as you didn't also include implicit use clauses for packages found in library IEEE,  that would work.  ( "a)  A potentially visible declaration is not made directly visible if the place considered is within the immediate scope of a homograph of the declaration", preventing things like changing type and subtype declarations as done for std_logic_vector in 2008, possibly precluding developing new versions of packages by other than tool vendors).

Personally I see this as a defect in the description provided by the std_logic_textio package declaration introduced as the result of the 2008 changes to package std_logic_1164, specifically adding various flavors of READ, WRITE, HREAD, HWRITE, OREAD and OWRITE instead of placing those in the  package std_logic_textio.

std_logic_textio is simply missing a library clause for library IEEE.  The package declaration for std_logic_textio has no meaning other than providing backward compatibility and should have contained the library clause making library logical name IEEE visible.

Adding additional an additional implicit context item seems the wrong solution. It defeats the purpose in having the library logical name IEEE made visible if there are no dependencies on it being visible other than for purposes of avoiding correcting the text of the std_logic_textio package declaration.  You could as easily argue that the packages found in library IEEE should be moved to library STD.










  1.




--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Sep 19 13:59:54 2013

This archive was generated by hypermail 2.1.8 : Thu Sep 19 2013 - 14:00:38 PDT