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

From: Mark Zwolinski <mz@ecs.soton.ac.uk>
Date: Fri Jan 25 2013 - 10:54:08 PST
Hi all,

This definition was introduced in VHDL'93 - the '87 standard doesn't 
have file modes. I have a vague recollection that there was a long 
discussion at the time about whether STD_OUTPUT should be WRITE_MODE or 
APPEND_MODE. (Or possibly this was at a later revision.) I can't 
remember the details, but I seem to recall that the argument was that 
STD_OUTPUT is not a standard file. In effect, each write is a standalone 
operation. Hence WRITE_MODE is more appropriate. However, I think Ryan 
is probably right - this is an out of scope question. It's sort of 
interesting, but only in the context of whether a 2013 OS works in the 
same way as a 1993 OS. I don't think things have changed that much and 
although WRITE_MODE may offend people's mental models (including my 
own), I don't see a good reason to change things now.

Cheers

Mark


On 25/01/2013 18:35, ryan.w.hinton@L-3com.com wrote:
> To sum up my thoughts in context, in general STDIN and STDOUT are streams, not files that can be reopened and cleared.  A simulator transcript window is a good example: the window is not a file that can be closed and reopened (and cleared ala WRITE_MODE).
>
> Ultimately, this discussion is moot because the OS typically hands in STDIN and STDOUT.  Since you didn't and can't open them yourself, the open mode is irrelevant.  As Brent pointed out, it's outside the scope of the LRM.  However, given the "stream" nature of STDIN/STDOUT, I think APPEND_MODE is a better model for the behavior.
>
> Enjoy!
>
> - Ryan
>
> -----Original Message-----
> From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] On Behalf Of Brent Hayhoe
> Sent: Thursday, January 24, 2013 4:59 PM
> To: vhdl-200x@eda.org
> Subject: Re: [vhdl-200x] RFC: std.textio.OUTPUT ?
>
> Hi Martin,
>
> I think that you have hit the nail on the head.
>
> As you say, the transcript (stdout) is started when the simulator executable initializes the environment.
>
> The TextIO STD_OUTPUT is not opened until the VHDL simulation task is run from within the tool.
>
> The initialization of 'stdout' cannot be defined by the VHDL LRM because we don't know what task is be performed yet. We might actually be going to run a Verilog simulation, cough! cough! splutter! spit! spit! (I know unthinkable really)
>
> The TextIO open is not performed until a VHDL simulation is started, or restarted which will involve closing and reopening STD_OUTPUT.
>
> On th point regarding your 'mental model' I understand completely. I think it is the 'engineer' in us and I think in the same way: "a task might be doing something, but how's it 'really' doing it!". ;-)
>
> Brent.
>
> On 24/01/2013 09:16, Martin.J Thompson wrote:
>>> -----Original Message-----
>>> From: owner-vhdl-200x@eda.org [mailto:owner-vhdl-200x@eda.org] On
>>> Behalf Of Walter Gallegos
>>> Sent: 23 January 2013 18:07
>>> To: vhdl-200x@eda.org
>>> Subject: Re: [vhdl-200x] RFC: std.textio.OUTPUT ?
>>>
>>> Martin,
>>>
>>> I think we are viewing this from different points, trying to explain
>>> my point :
>>>
>>> To me the simulation session start when I open the simulation tool,
>>> normally is at this point when the STD_OUTPUT stream is created.
>>>
>> [MJT]
>> Ahhh - I see.  To me, the simulation "session" starts each time I reset the simulation time to '0' (when I issue a "restart" command in Modelsim).
>>
>> So with your way of thinking, if STD_OUTPUT was opened in APPEND_MODE,
>> then each time you closed and the reopened your simulator you'd see
>> the end of the previous simulation session, and you wouldn't want
>> that. (Nor would I... I think)
>>
>> In which case, what we are differing over is not how the files/streams/windows work, but what the definition of a simulation session is... I wonder, does the standard say anything about that?
>>
>> Cheers,
>> Martin
>>
>

-- 
===================================================================
Professor Mark Zwolinski
Electronics & Electrical Engineering Research Group
Electronics & Computer Science           Tel. (+44) (0)23 8059 3528
University of Southampton                Fax. (+44) (0)23 8059 2901
Southampton SO17 1BJ, UK                 Email.  mz@ecs.soton.ac.uk
                                http://www.ecs.soton.ac.uk/people/mz


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Jan 25 10:54:52 2013

This archive was generated by hypermail 2.1.8 : Fri Jan 25 2013 - 10:54:58 PST