V
valtih1978
Guest
A file declaration opens a file implicitly when file open information is
included. Specification does not say when file is closed.
included. Specification does not say when file is closed.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
And, I can close the implicitly opened file at any time?open and close the files explicitly when you want to open and close them.
Your statement is true only for the original VHDL 1987 standard. To answer your question, the file is closed when the simulation ends.A file declaration opens a file implicitly when file open information is
included. Specification does not say when file is closed.
Still, they can be opened during elaboration (the old fashioned way) ifOn Monday, June 25, 2012 12:25:22 PM UTC-4, valtih1978 wrote:
open and close the files explicitly when you want to open and close
them.
And, I can close the implicitly opened file at any time?
When compiling with VHDL '93, there won't be any implicitly opened files.
The files won't be open until you explicitly open them.
When compiling with VHDL '93, there won't be any implicitly opened files. The files won't be open until you explicitly open them.open and close the files explicitly when you want to open and close them.
And, I can close the implicitly opened file at any time?
No. FILE_OPEN(f) is explicit when user calls it manually! TheAnd, I can close the implicitly opened file at any time?
When compiling with VHDL '93, there won't be any implicitly opened files.
The files won't be open until you explicitly open them.
Still, they can be opened during elaboration (the old fashioned way) if
declared as follows:
file fh: text open write_mode is "my_file.txt";
I guess this could be called "explicitly opening the file".
All I can find in 1076-2002 isAnd, I can close the implicitly opened file at any time?
When compiling with VHDL '93, there won't be any implicitly opened files.
The files won't be open until you explicitly open them.
Still, they can be opened during elaboration (the old fashioned way) if
declared as follows:
file fh: text open write_mode is "my_file.txt";
I guess this could be called "explicitly opening the file".
No. FILE_OPEN(f) is explicit when user calls it manually! The
declaration-specified open information calls this function implicitly. I
just wonder when the corresponding FILE_CLOSE(f) is or can be called in
this case?
Why are you wondering? I answered your question with my first post in the second sentence.file fh: text open write_mode is "my_file.txt";
I guess this could be called "explicitly opening the file".
No. FILE_OPEN(f) is explicit when user calls it manually! The
declaration-specified open information calls this function implicitly. I
just wonder when the corresponding FILE_CLOSE(f) is or can be called in
this case?
And, further, it (at least 1076-2008) does not forbid closing a fileAll I can find in 1076-2002 is
"If a file object F is associated with an external file, procedure
FILE_CLOSE terminates access to the external file associated with F and
closes the external file. If F is not associated with an external file,
then FILE_CLOSE has no effect. In either case, the file object is no
longer open after a call to FILE_CLOSE that associates the file object
with the formal parameter F.
An implicit call to FILE_CLOSE exists in a subprogram body for every
file object declared in the corresponding subprogram declarative part.
Each such call associates a unique file object with the formal
parameter F and is called whenever the corresponding subprogram
completes its execution."