David,
I am in favor of this type of organization as long as
the long term solution is consistent with the
current proposal. Summarizing the proposal:
<Proposal>
1) For all new packages, create the overloading
for the procedures read and write in the same
package where the type is defined.
Since read and write are not currently supported by
1076.6-2004, surround the read and write procedures
with the 1076.6 metacomments [amendment]:
-- rtl_synthesis on
-- rtl_synthesis off
2) In the future (after fast track), plan on merging
std.textio into std.standard and ieee.std_logic_textio
into ieee.std_logic_1164 into the package where the type is
defined. To ensure backward compatibility with respect
to package references create blank versions of std.textio
and ieee.std_logic_textio.
</Proposal>
Furthermore, I propose that we amend the proposal to
not require metacomments around the read and write
procedures and leave it up to 1076.6 to define support
for the read and write procedures. This is consistent
with how 1076.6 deals with other 1076 issues (such as
access types). Since 1164 and 1076.3 packages are now
part of 1076, the use of metacomments should
not be necessary.
The to_string functions are a separate issue and the current
proposal (FT05A) for to_string proposes to put these
functions in the same package where the type is defined
(consistent with #1 in the above proposal summary).
Since to_string can be used in the report statement,
the FT05A does not suggest putting it in metacomments.
For example:
assert (ExpectedVal = ReadVal)
report "In ... Expected Value /= Read Value. Expected = " &
to_string(ExpectedVal) &
" Read = " & to_string(ReadVal))
severity error ;
Cheers,
Jim
-- From David Bishop ...
Where do we put the "to_string", read and write functions
for the Numeric_std package?
This has not been a big problem in the past, basically what we did
was convert to 'std_logic_vector' and use "std_logic_textio". However,
this breaks down when we look at the floating point and fixed point
packages.
Thus I have the following suggestion:
In the numeric_std, fixed, and floating point package, these procedures
and functions will go directly into that package with meta comments
(see 1076.6) as follows:
-- synthesis translate_off
procedure WRITE (
L : inout line; -- input line
VALUE : in fp32; -- floating point input
JUSTIFIED : in SIDE := RIGHT;
FIELD : in WIDTH := 0);
procedure READ (
L : inout line; -- line
VALUE : out fp32);
procedure READ (
L : inout line; -- line
VALUE : out fp32;
GOOD : out boolean);
-- synthesis translate_on
For the next release, we can move all of the function from std_logic_textio
back into std_logic_1164 with these meta commends around them. That will
drop one package from what we have to support.
We can put the "to_string", "to_hstring", etc directly into std_logic_1164
with these meta comments.
Discussion? I am copying this to "vhdlsynth@vhdl.org" as it is not yet
merged with vhdl-200x-ft@eda.org.
-- David W. Bishop dbishop@vhdl.org All standard disclaimers apply.
Received on Fri Jun 18 16:13:31 2004
This archive was generated by hypermail 2.1.8 : Fri Jun 18 2004 - 16:13:34 PDT