The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 2:46pm
Pages: 1
Send Topic Print
writing into a file (Read 1450 times)
Horror Vacui
Senior Member
****
Offline



Posts: 127
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 15.1.0.627.
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

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

Posts: 1742
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.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 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 editor@designers-guide.org. Consider submitting a paper or model.