The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> file write https://designers-guide.org/forum/YaBB.pl?num=1349022867 Message started by kamath on Sep 30th, 2012, 9:34am |
Title: file write Post by kamath on Sep 30th, 2012, 9:34am Hi All, I have a circuit whose node voltage is being saved into file in Virtuoso. I am able to open a file and store the same. The problem is when I run a parametric sweep of a given variable lets say x=1:10, I get all the data into one single file. i would ideally want a file dataX.txt where X is 1:10 for each run. I checked the concatenation method in Verilog-A and been able to reach until a point where i am unable to find the right typecasting for X. Is there a way to do this to string from integer in verilog-a. Regards Kamath |
Title: Re: file write Post by Geoffrey_Coram on Oct 1st, 2012, 6:35am Some simulators may support sprintf. It's not mentioned explicitly in the LRM, but many features from 1364 Verilog or 1800 System Verilog are available in Verilog-AMS. |
Title: Re: file write Post by kamath on Oct 3rd, 2012, 7:34am Thanks Geoffrey. Yes $fstrobe or $sprintf works for writing. I was trying to know the parametric sweep number via verilog-a block than going for ocean. But may be I will have to check it by having an external file with the counter number since the schematic is re-run during every sim. Regards Kamath |
Title: Re: file write Post by Geoffrey_Coram on Oct 10th, 2012, 2:40pm I was thinking about using $sprintf to write to a string, generating the filename. But I suppose that requires not just $sprintf but also support for strings and an $fopen that can take a variable string argument (not just a fixed string literal). |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |