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

From: Walter Gallegos <waltergallegos@adinet.com.uy>
Date: Mon Jan 21 2013 - 13:19:33 PST
Hi Jim,

As I understand, when simulation start; STD_OUTPUT is opened - one and 
only one time - for write; that means, the simulation tool create a new 
empty file and connect the transcript window to this file, so the 
transcript windows is empty. Each write into STD_OUTPUT is append at end 
of the file but the file still open until the end of simulation run, 
this is more efficient than an open/write/close at each STD_OUTPUT access.

In my opinion WRITE_MODE is the correct option.

Best regards,
Walter

El 21/01/13 15:55, Jim Lewis escribió:
> 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

-- 
-----------------------------------------------------------
Walter Daniel Gallegos
Programmable Logic & Software
Consultoría, Diseño, Entrenamiento.
Montevideo, Uruguay
EMAIL waltergallegos@adinet.com.uy
Tel +598 26 23 44 60 | Cel +598 99 18 58 88
-----------------------------------------------------------

El presente correo y cualquier posible archivo adjunto está dirigido únicamente al destinatario del mensaje y contiene información que puede ser confidencial. Si Ud. no es el destinatario correcto por favor notifique al remitente respondiendo anexando este mensaje y elimine inmediatamente el e-mail y los posibles archivos adjuntos al mismo de su sistema. Está prohibida cualquier utilización, difusión o copia de este e-mail por cualquier persona o entidad que no sean las específicas destinatarias del mensaje.

This e-mail and any attachment is confidential and is intended solely for the addressee(s). If you are not intended recipient please inform the sender immediately, answering this e-mail and delete it as well as the attached files. Any use, circulation or copy of this e-mail by any person or entity that is not the specific addressee(s) is prohibited.


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

This archive was generated by hypermail 2.1.8 : Mon Jan 21 2013 - 13:20:07 PST