RE: $fopen/$fclose

From: Jonathan David <jbdavid_at_.....>
Date: Thu Apr 07 2005 - 04:26:29 PDT
Marq, 
 
I think most of those, and $fread, $fscanf, etc are well covered by
1364-2001 ( the reference I use for file IO ) ,
and the main issue HAS been (I hopefully emphasize the past tense) that
we didn't support the "MODE" for Opening a file
(read, write, append etc..)
 
My biggest frustration has been that I can't write to/read from the same
file from both the continuous  and discrete domains. 
I'll take that back.. its not being able to open a file for read in the
continuous domain, not being able to write from both domains
is subordinate. I've been coping by doing most of my file IO in the
discrete domain, where, (for me) all the 1364 file I/O functions (that
I've used) work as described in 1364-2001. 
 
The big difference between the AMS $fopen and 1364 has been the lack of
STRING variables and parameters in the continuous domain.. which
prevents us from manipulating the file name and path prior to using
$fopen. 
If we solve that, we might not even need to have our own version of
$fopen, we might just reference 1364..
(note that we also support % codes in the filename that are NOT
supported in 1364's $fopen!!! 
I would be happy if $swrite supported those EXTRA codes so I could use
them in building a string for the filename VARIABLE 
and then pass that variable to $fopen.. 
 
Of course I mainly Lurk here, and advise Martin for his votes.. and I
write this all from experience, rather than from a close recent reading
of the specs.. so I hope you find this helpful, and not disruptive. 
Jonathan
 

Jonathan David   Mixed-Signal IC
jbdavid@cadence.com Ph (408)894-2646


 


________________________________

	From: owner-verilog-ams@eda.org
[mailto:owner-verilog-ams@eda.org] On Behalf Of Marq Kole
	Sent: Thursday, April 07, 2005 3:08 AM
	To: verilog-ams@eda.org
	Subject: $fopen/$fclose
	
	

	All, 
	
	In the LRM section 10.5 the file operation tasks $fopen and
$fclose are described. However, given that nowhere in the standard
system tasks to write to or read from an opened file descriptor, this
seems a little pointless... 
	
	I do think that the display tasks paragraph (section 10.6) needs
to be extended with descriptions for $fstrobe, $fwrite, $fdisplay,
$fmonitor, and $fdebug. This is probably covered as well in the SV
standard, but I still wanted to point out a rather strange omission in
the Verilog-AMS LRMs (2.0, 2.1, and 2.2). 
	
	Regards, 
	Marq 
	
Received on Thu Apr 7 04:26:34 2005

This archive was generated by hypermail 2.1.8 : Thu Apr 07 2005 - 04:26:38 PDT