If you want to plot inductance versus frequency, you have to get access to the frequency: "w" or "f". However, this is totally obscure. To use frequency in the equation, use the function called xval().
For example, xval(vf("/out")) gets the frequency for the ac sweep.
To plot inductance, you would do an s-parameter sweep (sp) and use a port instead of vsin. Then plot (twoPi converts Hz to rads):
imag(ZP("/PORT0" "/PORT0")) / xval(ZP("/PORT0" "/PORT0")) / twoPi
Solution: plot the value of the signal at the simulation frequency. Ie, "value([your signal] [PSS frequency])"
Solution v2: take ymax( [your expression] )
Why would you want to do this? For a transient sim, you can't sweep a variable (parametric sweep) and run corners. However, PSS can sweep a variable while you run corners. Plus, PSS is good because you get phase noise and stuff. The downside is that PSS can be slow and may not converge.
I'm sure someone can figure out a better way, but I plotted the magnitude of the output voltage node vs. spectrum. Then I used the clip function to grab the frequency range I was interested in (around the first harmonic). Then I used xval() to grab the frequencies. Finally, ymax() turns the values into something that wavescan can handle. The final function looks like:
ymax(xval(v("/net3" ?result "pss_fd"))
If PSS ain't workin for you, then you'll want to write an ocean ("ocn") script. They really aren't too bad to write, and allow you to sweep whatever nested sweeps you want (temperature, process corners, bias, etc.). See http://uwvlsi.wikispaces.com/cadence_ocean_scripting
You must use a parametric sweep; using a DC analysis with a swept parameter will not work.
Plot using the calculator - see the Opt under the Info tab. Newer versions of Cadence actually use "gm" for gm, and the inverse of ro is given as gds. The DC gain of a transistor is thus Older versions use the BSIM names.
To use the value of a variable called "pin", use this statement: pv("top-level" "pin" ?result "designParamVals-info")
Another example is plotting delay (of, for example, a FO4 inverter) between nodes "in" and "out":
delay(VT("/in") (pv("top-level" "vdd" ?result "designParamVals-info") / 2) 1 "either" VT("/out") (pv("top-level" "vdd" ?result "designParamVals-info") / 2) 1 "either" 0 0 nil nil)
Here we use the delay function to plot the delay between two nets, net50 and net46, vs. the supply voltage, "vdd".
If you want to round a scalar, you can just use the "round" function.
If you need to round a series, use the a2d function.
value(VT("/op")-VT("/om") "mcparamset" 141 )
http://scytulip.wordpress.com/tag/cadence/
envSetVal(“viva.graphFrame” “width” ‘string “900″)
; Set the graph window’s width to 900
envSetVal(“viva.graphFrame” “height” ‘string “700″)
; Set the graph window’s height to 700
envSetVal(“viva.rectGraph” “background” ‘string “white”)
; Set the graph background to white
envSetVal(“viva.rectGraph” “foreground” ‘string “black”)
; Set the graph foreground to balck
envSetVal(“viva.axis” “font” ‘string “Fixed [Misc],12,-1,5,50,0,0,0,0,0″)
; Set graph axises’ font and size
envSetVal(“viva.pointMarker” “font” ‘string “Fixed [Misc],12,-1,5,50,0,0,0,0,0″)
; Set graph markers’ font and size
envSetVal(“viva.trace” “lineThickness” ‘string “thick”)
; Set graph’s default trace line to be thick
You can find the other properties in the Virtuoso Visualization & Analysis Tool User Guide.
Put these code in the Virtuoso main window’s console as below, and then press ENTER. OK, before closing the Virtuoso design environment, you can enjoy the new “default” settings now.
We should be able to use these commands to write a script to export a "nice" png image. Why do the defaults suck so badly...