An alternate way of opening the file without calling the explicit
FILE_OPENprocedure is similar to the method used in VHDL87. This
method uses a file declaration similar to the one in VHDL87, that specifies
the name of the file object, the mode of the file object, and the external
filename to be associated with the file object as shown here:
FILE infile : int_file OPEN READ_MODE IS “/doug/test/
example3”;
This effectively calls the FILE_OPENprocedure as follows:
FILE_OPEN(infile, “/doug/test/example3”, READ_MODE);
When a file type declaration of a particular type_markis declared the
following declarations are implicitly declared.
TYPE FT IS FILE OF type_mark;
PROCEDURE FILE_OPEN( FILE F : FT;
EXTERNAL_NAME : IN STRING;
OPEN_KIND : IN FILE_OPEN_KIND :=
READ_MODE);
PROCEDURE FILE_OPEN( STATUS : OUT FILE_OPEN_STATUS;
FILE F : FT;
EXTERNAL_NAME : IN STRING;
OPEN_KIND : IN FILE_OPEN_KIND :=
READ_MODE);
PROCEDURE FILE_CLOSE( FILE F : FT);
PROCEDURE READ( FILE F : FT; VALUE : OUT type_mark);
PROCEDURE WRITE( FILE F : FT; VALUE : OUT type_mark);
PROCEDURE ENDFILE( FILE F : FT) RETURN BOOLEAN;
The file type declaration declares a file of type type_mark. With the file
type declaration all of the above procedures are implicitly declared. Once
these procedures are declared they can be used to read and write files of
the type_mark.
Foreign Interface
In VHDL87 it was possible to call functions and procedures that were not
described using VHDL. It was possible but limited in scope and not very
well defined. The VHDL93 package standard now contains an attribute
Appendix D: VHDL93 Updates 455