Simulation data generated by a simulator integrated with the Cadence Analog Design Environment, raw or post-processed, can be printed to text files using the
print or
printvs command. But if the data size is very large, Cadence will suggest the
ocnPrint command which can be executed from the CIW.
This is an OCEAN (Open Command Environment for Analysis) command with the following syntax (OCEAN Reference, Ch. 8):
ocnPrint( [?output t_filename
| p_port
] [?precision x_precision
] [?numberNotation s_numberNotation
] [?numSpaces x_numSpaces
] [?width x_width
] [?from x_from
] [?to x_to
] [?step x_step
] o_waveform1
[o_waveform2
...] ) => t
/nil
Example:
1. ocnPrint(clip((v("/Vo" ?result "tran")) 5.4e-06 6.2e-06) ?output "./x.txt" ?precision 16 ?numberNotation 'none)An ASCII file
x.txt appeared in the current directory, containing the transient voltage of node
Vo from 5.4u to 6.2u and the corresponding time vector, with the maximum precision of 16-digit.
The data can then be further processed in other tools. For example, I imported the data to MATLAB, applied amplitude clipping to the voltage and did an FFT. Before the FFT,
Vo is interpolated into a constant time-step vector of the length
2^N.
N is of course an integer:
tr = linspace(x(1,1),x(end,1),2^N);
xr = spline(x(:,1),x(:,2),tr);
Might not be very smart but is surely a great option.
2.
ocnPrint( ?output "./myOutputFile" v("net1") ?from 0 ?to 0.5n ?step 0.1n ?numberNotation ’engineering ?precision 10)
That will print the voltage at "net1" to "./myOutputFile" starting from
0 to 0.5ns with steps of 0.1n with a 10 decimal points and an
engineering notation.