TEXTIO Package |
LRM §14.3. |
Package Textio contains declarations of types and subprograms that support formatted I/O operations on text files.
Textio is a VHDL package that allows the reading and writing of ASCII text files from VHDL. Textio is part of the LRM, and is in the library Std.
package TEXTIO is type LINE is access string; type TEXT is file of string; type SIDE is (right, left); subtype WIDTH is natural; file input : TEXT open READ_MODE is "STD_INPUT"; file output : TEXT open WRITE_MODE is "STD_OUTPUT"; procedure READLINE(file F: TEXT; L: out LINE); procedure READ(L:inout LINE; VALUE: out bit; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out bit); procedure READ(L:inout LINE; VALUE: out bit_vector; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out bit_vector); procedure READ(L:inout LINE; VALUE: out BOOLEAN; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out BOOLEAN); procedure READ(L:inout LINE; VALUE: out character; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out character); procedure READ(L:inout LINE; VALUE: out integer; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out integer); procedure READ(L:inout LINE; VALUE: out real; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out real); procedure READ(L:inout LINE; VALUE: out string; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out string); procedure READ(L:inout LINE; VALUE: out time; GOOD : out BOOLEAN); procedure READ(L:inout LINE; VALUE: out time); procedure WRITELINE(file F : TEXT; L : inout LINE); procedure WRITE(L :inout LINE; VALUE : in bit; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0); procedure WRITE(L : inout LINE; VALUE : in bit_vector; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0); procedure WRITE(L : inout LINE; VALUE : in BOOLEAN; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0); procedure WRITE(L : inout LINE; VALUE : in character; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0); procedure WRITE(L : inout LINE; VALUE : in integer; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0); procedure WRITE(L : inout LINE; VALUE : in real; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0; DIGITS: in NATURAL := 0); procedure WRITE(L : inout LINE; VALUE : in string; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0); procedure WRITE(L : inout LINE; VALUE : in time; JUSTIFIED: in SIDE := right; FIELD: in WIDTH := 0; UNIT: in TIME := ns); end TEXTIO;