IEEE 200X Fast Track Change Proposal ID: FT05 Proposer: Jim Lewis (jim@synthworks.com) Status: Open Proposed: 1-Jan-2003 Analyzed: Date Resolved: Date Enhancement Summary: Add to_string, to_hstring, to_ostring, to_dstring Related issues: Also discussed in std_1164. Also see ft06. Relevant LRM section: Enhancement Detail: ---------------------------- Add conversion functions to std.textio/ieee.std_logic_textio (see 1164 about donation of this package before panicing) that convert from a type to string. Alternately since these will be used by report, should they be defined in std.standard and std_logic_1164? Much the same way 'image does, but for all types (not just scalars). Procedures should support formatting similar to std.textio.write. This permits printing of useful messages with assert/report: assert (ExpectedVal = ReadVal) report "In ... Expected Value /= Read Value. Expected = " & to_string(Expected) & " Read = " & to_string(ReadVal)) severity error ; It also allows usage of VHDL-93 write(, ) in a single print line statement: write(Output, "%%%ERROR data value miscompare in CpuModel." & CRLF & " Actual data value = " & to_hstring(Data) & CRLF & " Expected data value = " & to_hstring(ExpData) & CRLF & " at time: " to_string(now, right, 12) ) ; For Discussion: ---------------------------- Should the functions have long names (to_string), or short names (to_str or tostr), or support both with aliases? Analysis: ---------------------------- [To be performed by the 200X Fast Track Working Group] Resolution: ---------------------------- [To be performed by the 200X Fast Track Working Group]