Package: Textio
- File: textio.vhdl
Types
Name | Type | Description |
---|---|---|
Line | ||
text | A file of variable-length ASCII records. Note: in order to work correctly, the TEXT file type must be declared in the Textio package of library Std. Otherwise, a file of string has a non-ASCII format. | |
side | (right, left) |
For justifying ouput data within fields. |
Functions
- Justify (Value: String;
Justified : Side := Right;
Field: Width := 0 ) return String
Description
For specifying widths of output fields.
standard text files
START-V08
- readline (variable f: in text;
l: inout line) return ()
Description
V87
- readline (file f: text;
l: inout line) return ()
Description
!V87
- read (l: inout line;
value: out bit;
good: out boolean) return ()
Description
For READ procedures:
In this implementation, any L is accepted (ie, there is no constraints
on direction, or left bound). Therefore, even variable of type LINE
not initialized by READLINE are accepted. Strictly speaking, this is
not required by LRM, nor prevented. However, other implementations may
fail at parsing such Strings.
Also, in case of error (GOOD is false), this implementation do not
modify L (as specified by the LRM) nor VALUE.
For READ procedures without a GOOD argument, an assertion fails in case
of error.
In case of overflow (ie, if the number is out of the bounds of the type),
the procedure will fail with an execution error.
FIXME: this should not occur for a bad String.
- read (l: inout line;
value: out bit) return ()
- read (l: inout line;
value: out bit_vector;
good: out boolean) return ()
- read (l: inout line;
value: out bit_vector) return ()
- read (l: inout line;
value: out boolean;
good: out boolean) return ()
- read (l: inout line;
value: out boolean) return ()
- read (l: inout line;
value: out character;
good: out boolean) return ()
- read (l: inout line;
value: out character) return ()
- read (l: inout line;
value: out integer;
good: out boolean) return ()
- read (l: inout line;
value: out integer) return ()
- read (l: inout line;
value: out real;
good: out boolean) return ()
- read (l: inout line;
value: out real) return ()
- read (l: inout line;
value: out String;
good: out boolean) return ()
- read (l: inout line;
value: out String) return ()
- read (l: inout line;
value: out time;
good: out boolean) return ()
Description
This implementation requires no space after the unit identifier,
ie "7.5 nsv" is parsed as 7.5 ns.
The unit identifier can be in lower case, upper case or mixed case.
- read (l: inout line;
value: out time) return ()
- Sread (L : inout Line;
Value : out String;
Strlen : out Natural) return ()
Description
START-V08
- Oread (L : inout Line;
Value : out Bit_Vector;
Good : out Boolean) return ()
- Oread (L : inout Line;
Value : out Bit_Vector) return ()
- Hread (L : inout Line;
Value : out Bit_Vector;
Good : out Boolean) return ()
- Hread (L : inout Line;
Value : out Bit_Vector) return ()
- writeline (variable f: out text;
l: inout line) return ()
Description
V87
- writeline (file f: text;
l: inout line) return ()
Description
!V87
- Tee (file f : Text;
L : inout LINE) return ()
Description
START-V08
- write (l: inout line;
value: in bit;
justified: in side := right;
field: in width := 0) return ()
Description
END-V08
This implementation accept any value for all the types.
- write (l: inout line;
value: in bit_vector;
justified: in side := right;
field: in width := 0) return ()
- write (l: inout line;
value: in boolean;
justified: in side := right;
field: in width := 0) return ()
- write (l: inout line;
value: in character;
justified: in side := right;
field: in width := 0) return ()
- write (l: inout line;
value: in integer;
justified: in side := right;
field: in width := 0) return ()
- write (L: inout line;
value: in real;
justified: in side := right;
field: in width := 0;
digits: in natural := 0) return ()
- write (l: inout line;
value: in String;
justified: in side := right;
field: in width := 0) return ()
- write (l: inout line;
value : in time;
justified: in side := right;
field: in width := 0;
unit : in TIME := ns) return ()
Description
UNIT must be a unit name declared in std.standard. Of course, no rules
in the core VHDL language prevent you from using a value that is not a
unit (eg: 10 ns or even 5 fs).
An assertion error message is generated in this case, and question mark
(?) is written at the place of the unit name.
- Owrite (L : inout line;
value : in Bit_Vector;
Justified : in Side := Right;
Field : in Width := 0) return ()
- Hwrite (L : inout line;
value : in Bit_Vector;
Justified : in Side := Right;
Field : in Width := 0) return ()