Technical data

TextIO implementation issues
ModelSim EE/PLUS Reference Manual The TextIO Package
-
429
The ENDFILE function
In the
VHDL Language Reference Manuals, IEEE Std 1076-1987 and IEEE Std
1076-1993
, the ENDFILE function is listed as:
-- function ENDFILE (L: in TEXT) return BOOLEAN;
As you can see, this function is commented out of the standard TextIO package.
This is because the ENDFILE function is implicitly declared, so it can be used
with files of any type, not just files of type TEXT.
Usin
g
alternative input/output files
You can use the TextIO package to read and write to your own files. To do this,
just declare an input or output file of type TEXT.
The VHDL’87 declaration is:
file
myinput : TEXT
is in
"pathname.dat";
For VHDL’93 the declaration is:
file
myinput : TEXT
open
read_mode
is
"pathname.dat";
Then include the identifier for this file ("myinput" in this example) in the
READLINE or WRITELINE procedure call.
Providin
g
stimulus
You can create batch files containing
force
(p319) commands that provide
stimulus for simulation. A VHDL testbench has been included with the Model
Sim
install files as an example; it illustrates how results can be generated by reading
vectors from a file. Check for this file:
<install_dir>/modeltech/examples/stimulus.vhd