[vhdl-200x] RFC: std.textio.OUTPUT ?

From: Jim Lewis <Jim@synthworks.com>
Date: Mon Jan 21 2013 - 09:55:10 PST
Hi,
The definition of the file OUTPUT, does not seem consistent
with its implementation.  std.textio defines OUTPUT as follows:
   file OUTPUT: TEXT open WRITE_MODE is "STD_OUTPUT";

Based on the way it works it seems to be implemented as:
   file OUTPUT: TEXT open APPEND_MODE is "STD_OUTPUT";

For WRITE_MODE, the LRM says:
   If the value supplied to the Open_Kind parameter is WRITE_MODE,
   the access mode of the file object is write-only. In addition,
   the external file is made initially empty. Values written to
   the file object are placed in the external file in the order
   in which they are written.

For APPEND_MODE, the LRM says:
   If the value supplied to the Open_Kind parameter is APPEND_MODE,
   the access mode of the file object is write-only. In addition,
   the file object is initialized so that values written to it
   will be added to the end of the external file in the order in
   which they are written.


Based on this, when a simulator writes to the file OUTPUT, it
should first empty the file/transcript window.  Its behavior
is much closer to APPEND_MODE.

I think simulators are doing the correct action and suggest
that this is resolved by changing the definition of the
file OUTPUT to use APPEND_MODE.

Comments?  If others agree, then this needs to be entered as
an ISAC issue.

Best,
Jim
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training             mailto:Jim@SynthWorks.com
SynthWorks Design Inc.           http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Jan 21 09:55:45 2013

This archive was generated by hypermail 2.1.8 : Mon Jan 21 2013 - 09:56:26 PST