The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> writing into a file
https://designers-guide.org/forum/YaBB.pl?num=1532274183

Message started by Horror Vacui on Jul 22nd, 2018, 8:43am

Title: writing into a file
Post by Horror Vacui on 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.

Title: Re: writing into a file
Post by Andrew Beckett on 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.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.