[VerilogA file I/O issue] How to open an existing file and append data to it?

Status
Not open for further replies.

wandola

Junior Member level 3
Joined
Jul 20, 2005
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,554
Im doing monte carlo simulation of a clocked comparator. I want to save some signal data into a text file. So I wrote a small veriloga file to save the output. there is no problem.

But when I started running monte carlo, there were many many runs. So everytime when a new run starts, my saved data are overwritten.

I studied the veriloga mannual. I didn't find anything on file append. unlike C++, there is no "write","read","append"options in verilog. fstrobe,fwrite don't support appending data to an existing file.

does anybody know how to solve this issue?

I just want to append all monte carlo simulation data to a single file.

Thanks and regards.
 

You can actually write a perl script that does all this, and call hspice or spectre or whatever you are using for the simulation through the script. You could even write UNIX shell code (more complicated).
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…