You should be able to use the ocnPrint() command to output tabulated results to a file - look at the Finder (startFinde() in the CIW, or "cdsFinder" at the Unix prompt) for short help, and cdnshelp (or CDSdoc, if using an older release) for the full documentation. The ocnPrint command can accept a filename which it will write to, and for the input, it could be the named waveform, or perhaps the result of a calculation. You might need to look at ocnYvsYplot() also?
Hope this helps!
In reply to skillUser:
From the results browser you can select the signals in Wavescan and do File->Save Signal. Then you can choose the output to be in CSV, VCSV (additional info added for ViVA's purpose), Matlab, or spectre input format. Alternatively you can send the data to a table and then do File->Save as CSV from the table.
If you've already plotted the traces and have the waveform window, you can select the traces you want (or do Trace->Select All), and then do Trace->Save and save as CSV, VCSV, Matlab etc.
In reply to Andrew Beckett:
Thanks guys. I selected all traces and saved as csv.
I have multiple trace plotted in Wavescan ( the trace are from multiple simulation run of the sam eschematic and appended on the same wavescan window) . I selected all and then save in spectre.in format.
When I reload it into nothing came on wave-scan.
When I saved all trace in VCSV format and reloaded I got only the last trace in the wave scan.
Could you please tell what is the issue and how it can be solved.
In reply to RFQuery:
I don't think re-loading from spectre input format is supported (it's intended to be used as a PWL file for spectre). However, VCSV should work fine - I've tried with both wavescan (from IC5141, 126.96.36.1990.6.151) and also with ViVA (from IC615, 188.8.131.520.14), and it works fine in both cases.
So please explain which version you're using (Help->About will tell you), and precisely what steps you're doing.
I use IC5141 and MMSIM10 (Version 10.1.1.200.isr13 32bit -- 15 Aug 2011).
I ran one simulation on trace is plotted on the wavescan.
Then I chnaged some parameter of the circuit and plotted (appended) on wave scan.
NOW I selected all and then save in spectre.in format.
I want to save both the traces to be saved so that I can prcure the wave whenever I want without running the simulation
First of all, you'd need to use a vcsv file (not a spectre.in file, as I mentioned before). Then you're hitting the problem that because the signal names are repeated, it only loads one of them (you've effectively got multiple signals with the same name on the graph, and whilst they are named sig<0>, sig<1> etc on the graph, that information is not retained in the file. Even if you edit the name of the signal (double click on the signal and change its name) that is not saved into the VCSV file (this works OK in ViVA in IC615 though).
So, the solution is to edit the header of the VCSV file after saving, and change the names to be unique (don't use any non-alphanumeric characters in the names to be safe) - so if you see mysig, mysig change it to mysig1, mysig2 for example.
Then you can load both signals from the VCSV file.
BTW, it was really the IC5141 subversion I was interested in; the simulator version is irrelevant. However, the key information that was missing before is the fact that you're plotting the same signal more than once from different simulation runs. That's important...
Thanks a lot for a clear explanation.
I did the way you have mentioned and indeed it worked nice.
I appreciate your help and time.
When I export two signals of same test bench, from VIva to CSV , I have different X-axis values for the 2 signals. What Should I do so that the two signals are plotted with same X-axis (time sampling) ?
Please do the needful.
In reply to satish chandra:
Not sure which simulator you're using? If using Ultrasim, each node will have different X axis points, whereas spectre should use the same points unless you've used the "compression" option on the transient options form (which causes each signal to have its own X axis, and to only output points when the changes have been significant enough).
Certainly in IC615 I can also choose to clip the data and specify a from to and interpolation step when I do the export.
Thanks a lot Andrew.
I happen to do this after I mailed you :)
In reply to Milad Moradpour:
Just to make sure I understand, what are you planning to do with this saved data? By "command line", would an OCEAN script be OK?
I am running spectre with an external software (MATLAB). It is done using commands (spectre input.scs) in "Command Window" of MATLAB.
Since, I want to post process and optimize the Cadence simulation, I need to access the inputs and outputs of the Cadence simulation. The inputs variable and parameters are available in the input.scs file in the netlist root (It will be valuable if you know also how it is possible to change the data of input.scs using commands).
But, the output.csv should be generated manually as you explained. The problem is that for an optimization, MATLAB will invoke cadence for too many iterations. Therefore, it is impossible to generate the output.csv each time with the mentioned approach. I suppose to use some commands for this job and include them in my MATLAB scripts.
Regarding to "Ocean Scripts", I don't know what is it. But, if it will help the problem, explain me how.
Rather than generating a CSV and then reading that into Matlab, it would be far simpler to use the Spectre toolbox for Matlab that is provided in the MMSIM installation. If you run `cds_root spectre`/tools/bin/cdnshelp and search for "Matlab" you'll find info on it.
This toolbox (using the cds_srr matlab function that we provide) allows you to directly read the simulation results into Matlab without needing to convert them to CSV first.
That's why I asked - I had a sneaking suspicion that you might want to read it into Matlab...
The simulation database can contain lots of other things too - not just transient results. You can save (via info analysis statements) the parameters used, the component values, and numerous other things.