The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 12:41pm
Pages: 1
Send Topic Print
How to append data to a file instead of overwrite it in VerilogA? (Read 2695 times)
wandola
Junior Member
**
Offline



Posts: 24

How to append data to a file instead of overwrite it in VerilogA?
Nov 13th, 2010, 6:45pm
 
I create a  verilogA file to save some signals into a file during my simulation. It works.

Then I try to run Monte Carlo simulation. It turns out that everytime when a new run starts, my old data from previous run are all overwritten by the verilogA block. ('cause the file name is the same during monte carlo runs.)

So anybody knows how to append the data to a existing file? instead of overwrite it...

Thanks a lot. Embarrassed

Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: How to append data to a file instead of overwrite it in VerilogA?
Reply #1 - Nov 15th, 2010, 6:23am
 
Per the 1364-2005 (digital Verilog) LRM, the $fopen system function takes a second argument, which can be "a" to append.

Verilog-AMS should follow the same syntax, since it's based on that LRM.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
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.