A colleague of mine recently struggled to plot multiple XY plots using the Cadence ADE simulator.
Assume you have a nonlinear circuit of some kind (see below where we have added some AM modulation, some limiter and a squaring circuitry to form some kind of nonlinearity) and you would like to plot the good old XY plots to investigate e.g. the IV-curves or any other types of hysteresis or so. In the Cadence ADE environment, this can simply be done by going to the (version 6 and above)
Axis > Y vs Y ... and select what you have on the Y-axis. Easy-peasy.
The problem however occurs with family plots (from parametric sweeps). The interface to the waveform viewer does not allow you to do a convenient XY plot. In the Y-Y option in the menu you can only select one out of all the waveforms, it is not possible to do it on a element-to-element basis. Selecting one of them brings it into a mess.
Notice that the new min and max X values are the same in both XY plots – even though we change the input amplitude in the parametric sweep.
It can be done in a tedious way: select for each single curve a new X curve and then plot it and drag it to a new window. However, with e.g. 20 curves and beyond this grows to something not that pleasant. Especially, if you have to re-simulate.
“Obviously” a piece of OCEAN script would solve this brilliantly since you would have control over the different loops you do and you would quite easily extract the individual waveforms and plot them in the same window.
If one wants to avoid the scripts the option is to add some simple code snippet in the Virtuoso window. Assume we want to plot the
vOut (along Y axis) as function of
vIn (along X axis) for each one of the parametric sweeps. We can try with the following code to extract one of the waveforms:
yyy = VT("/vOut")
xxx = VT("/vIn")
waveNo = 0
xVec = drGetWaveformYVec( drGetElem( drGetWaveformYVec(xxx) waveNo) )
yVec = drGetWaveformYVec( drGetElem( drGetWaveformYVec(yyy) waveNo) )
(setq wave (drCreateEmptyWaveform))
(drPutWaveformXVec wave xVec)
(drPutWaveformYVec wave yVec)
(With a little bit of copy from some of the brilliant Andrew Beckett’s posts…)
and then it is just to wrap your favourite for/while loop on top of that and change your waveNo accordingly. (Check when
drGetElem( drGetWaveformYVec(yyy) waveNo) evaluates to
nil to abort the loop). The result becomes something like this:
where we now see the min and max values of the X axes change with input amplitude.