The Designer's Guide Community
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 26th, 2020, 11:41pm
Pages: 1
Send Topic Print
writing into a file (Read 729 times)
Horror Vacui
Senior Member

Posts: 105
Dresden, Germany
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: 1731
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
Copyright 2002-2020 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to Consider submitting a paper or model.