File Opening and Closing
In VHDL87, files are opened and closed when the associated file object comes into and goes out of scope
In VHDL93, files can be opened in the declaration or predefined procedures can be used:
PROCEDURE FILE_OPEN(FILE identifier:file_type;
open_kind: FILE_OPEN_KIND := READ_MODE);
PROCEDURE FILE_OPEN(status: OUT FILE_OPEN_STATUS;
FILE identifier: file_type;
open_kind: FILE_OPEN_KIND := READ_MODE);
PROCEDURE FILE_CLOSE(FILE identifier: file_type);
Notes:
In VHDL87, the file is opened and closed when it come into and goes out of scope.
In VHDL93, there are two FILE_OPEN procedures, one of which returns a value of the status (success) for opening the file, and one which doesn’t. There is also a FILE_CLOSE procedure.
The values for FILE_OPEN_KIND are:
The values for FILE_OPEN_STATUS are: