The Designer's Guide Community
Models in Minutes
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines. Dec 14th, 2018, 11:42pm
  HomeHelpSearchLoginRegisterPM to admin  
Pages: 1
Send Topic Print
writing into a file (Read 203 times)
Horror Vacui
Community Member

Posts: 72
writing into a file
Jul 22nd, 2018, 8:43am
Hi Everyone,

I am writing data into a file from a Verilog-A module with $fopen(), $fwrite() and $fclose() functions. The problem is that the output file contains only the first 8192 bytes, but not the rest of the information. It seems to me that spectre channels the characters from fwrite() into a buffer and write this buffer into the file only at fclose() and only the first 8192 bytes... I do not understand this behaviour...
Is there any easy way to force spectre to write into the file regularly without opening and closing the file after every write?
I am running spectre APS simulations with mmsim
Back to top
View Profile   IP Logged
Andrew Beckett
Senior Fellow

Life, don't talk to
me about Life...

Posts: 1693
Bracknell, UK
Re: writing into a file
Reply #1 - Jul 23rd, 2018, 8:52am
I would expect the buffer to be flushed when $fclose is called - I didn't check, but I've not heard other reports of such behaviour.

You should be able to use $fflush if you want to flush more regularly.


Back to top
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Trouble viewing this site? Copyright © 2002-2018 Designer's Guide Consulting. 'Designer's Guide' is a registered trademark of Designer's Guide LLC. All rights reserved.

Our colleges are not as safe as they seem. Sexual assault is pervasive and the treatment of the victim by the adminstration is often as damaging as the assault: Campus Survivors, Campus Survivors Forum.

Some of our other sites that you might find useful: Avendesora, Inform and QuantiPhy.