diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/Makefile.inc | 12 | ||||
-rw-r--r-- | libraries/ieee2008/std_logic_1164-body.vhdl | 3 | ||||
-rw-r--r-- | libraries/std/textio.vhdl | 14 | ||||
-rw-r--r-- | libraries/std/textio_body.vhdl | 36 |
4 files changed, 56 insertions, 9 deletions
diff --git a/libraries/Makefile.inc b/libraries/Makefile.inc index 5d1cc76f1..a6dfe61a9 100644 --- a/libraries/Makefile.inc +++ b/libraries/Makefile.inc @@ -58,14 +58,12 @@ ieee2008/numeric_std-body.vhdl \ ieee2008/numeric_std_unsigned.vhdl ieee2008/numeric_std_unsigned-body.vhdl \ ieee2008/fixed_float_types.vhdl \ ieee2008/fixed_generic_pkg.vhdl \ -ieee2008/fixed_pkg.vhdl -# ieee2008/numeric_bit-body.vhdl \ -# -#ieee2008/fixed_generic_pkg-body.vhdl - -# -#ieee2008/float_generic_pkg-body.vhdl +ieee2008/fixed_pkg.vhdl \ +ieee2008/numeric_bit-body.vhdl \ +ieee2008/fixed_generic_pkg-body.vhdl #ieee2008/float_generic_pkg.vhdl +#ieee2008/float_generic_pkg-body.vhdl +# #ieee2008/float_pkg.vhdl STD87_BSRCS := $(STD_SRCS:.vhdl=.v87) diff --git a/libraries/ieee2008/std_logic_1164-body.vhdl b/libraries/ieee2008/std_logic_1164-body.vhdl index 7a9c91d9e..e5c56de74 100644 --- a/libraries/ieee2008/std_logic_1164-body.vhdl +++ b/libraries/ieee2008/std_logic_1164-body.vhdl @@ -1108,7 +1108,8 @@ package body std_logic_1164 is variable c : CHARACTER; begin while L /= null and L.all'length /= 0 loop - if (L.all(1) = ' ' or L.all(1) = NBSP or L.all(1) = HT) then + c := l (l'left); + if c = ' ' or c = NBSP or c = HT then read (l, c, readOk); else exit; diff --git a/libraries/std/textio.vhdl b/libraries/std/textio.vhdl index 49e404325..25d90ec04 100644 --- a/libraries/std/textio.vhdl +++ b/libraries/std/textio.vhdl @@ -122,6 +122,10 @@ package Textio is procedure writeline (variable f: out text; l: inout line); --V87 procedure writeline (file f: text; l: inout line); --V93 + --START-V08 + procedure Tee (file f : Text; L : inout LINE); + --END-V08 + -- This implementation accept any value for all the types. procedure write (l: inout line; value: in bit; @@ -161,5 +165,13 @@ package Textio is alias Bwrite is write [Line, Bit_Vector, Side, Width]; alias Binary_Write is write [Line, Bit_Vector, Side, Width]; - --END-V08 + + procedure Owrite (L : inout line; value : in Bit_Vector; + Justified : in Side := Right; Field : in Width := 0); + alias Octal_Write is Owrite [Line, Bit_Vector, Side, Width]; + + procedure Hwrite (L : inout line; value : in Bit_Vector; + Justified : in Side := Right; Field : in Width := 0); + alias Hex_Write is Hwrite [Line, Bit_Vector, Side, Width]; +--END-V08 end textio; diff --git a/libraries/std/textio_body.vhdl b/libraries/std/textio_body.vhdl index a57ed03c3..b402174a4 100644 --- a/libraries/std/textio_body.vhdl +++ b/libraries/std/textio_body.vhdl @@ -102,6 +102,28 @@ package body textio is end if; end writeline; + --START-V08 + procedure Tee (file f : Text; L : inout LINE) is + begin + if l = null then + -- LRM93 14.3 + -- If parameter L contains a null access value at the start of the call, + -- the a null string is written to the file. + write (f, ""); + write (Output, ""); + else + -- LRM93 14.3 + -- Procedure WRITELINE causes the current line designated by parameter L + -- to be written to the file and returns with the value of parameter L + -- designating a null string. + write (f, l.all); + write (Output, l.all); + deallocate (l); + l := new string'(""); + end if; + end Tee; + --END-V08 + procedure write (l: inout line; value: in string; justified: in side := right; field: in width := 0) @@ -460,6 +482,20 @@ package body textio is write (l, str (1 to pos - 1), justified, field); end write; + --START-V08 + procedure Owrite (L : inout line; value : in Bit_Vector; + Justified : in Side := Right; Field : in Width := 0) is + begin + write (l, to_ostring (value), justified, field); + end Owrite; + + procedure Hwrite (L : inout line; value : in Bit_Vector; + Justified : in Side := Right; Field : in Width := 0) is + begin + write (l, to_hstring (value), justified, field); + end Hwrite; +--END-V08 + procedure untruncated_text_read --V87 (variable f : text; str : out string; len : out natural); --V87 procedure untruncated_text_read --V93 |