masthead image masthead stretchable image

Cadence suite for IC design and simulation

Here you will find some short tutorials and tips for beginners on the Cadence EDA suite for analog IC design (Virtuoso and Spectre);
these are not general how-to tutorials on how Cadence Virtuoso works, instead this page is meant as a resource on some specific topics that sometimes are just skimmed in the introductory tutorials.

The official Cadence documentation (they provide a user guide and reference manual for every software package) is a very good source of information, however sometimes it can appear a little
overwhelming to the beginner since there are a lot of manuals and they are usually lenghty: the workshop manuals instead focus on more specific topics (e.g. LNA design and simulation) and are
really useful as a quick reference. There is also the online documentation, accessible from the GUI or using the terminal; e.g. to get help on the Spectre 'TRAN' simulation type:
spectre -help tran

Another very good resource is the Cadence forum.



Index







Cadence Spectre simulator Analysis Types

Here you will find a short description of the most important analyses in Cadence Spectre.
You can also download a couple of spreadsheets:
SPECTRE_Analysis_Parameters.ods describes analysis parameters for the most common SPECTRE analyses and
SPECTRE_Components_Parameters.ods describes components parameters for some widely used components like: MOS, BJT, Diode, Resistor, port, ...etc .
You can use those spreadsheets as a quick, searchable reference, instead of looking in the manuals or in the online help.
Below are two screenshots of the spreadsheets opened in LibreOffice Calc:

SPECTRE_Components_Parameters.ods screenshot SPECTRE_Components_Parameters.ods screenshot







DC Analysis

Computes the DC operating point of a circuit. If a parameter is sweeped, e.g. source parameter (voltage, current, impedance,...), model parameter (resistance, capacitance, physical dimension,...) or temperature, it also finds the DC transfer curves.
It is a large-signal analysis.



SP Analysis

Computes the S-parameters (Scattering parameters) of a circuit where inputs and outputs are defined as ports, after linearizing the circuit around it's DC operating point.

Cadence ADE direct plot window
Some functions in the Direct Plot Form
SP, ZP, YP, HP S-, Z-, Y-, and H-parameters
GD group delay
VSWR Voltage Standing Wave Ratio
NFmin minimum noise figure
Rn noise sensitivity parameter
NF noise figure
Kf & B1f stability terms
GT transducer gain
GA available gain, with conjugate matched output
GP power gain, with conjugate matched input
ZM impedance at port m
NC noise circles
GAC available gain circles
GPC power gain circles
LSB load stability circles
SSB source stability circles



PZ Analysis

Computes poles and zeros of a circuit which is linearized around it's DC operating point.

NOTE: components whose capacitance or impedance is frequency-dependent (e.g. transmission lines) are substituted by Spectre with their equivalent capacitance or impedance calculated at the frequency you define in the analysis window (default: 1Hz).


AC Analysis

It is a small-signal analysis that operates using linearized circuit equations around the DC operating point. It assumes that the circuit can be represented with a linear time-invariant model.
It is used to compute the transfer function between a source and all the nodes in a circuit: use this analysis to find for example the small-signal gain of a circuit (if you set the 'AC magnitude' parameter to 1 for the signal source, usually an ideal voltage or current generator, you can then directly plot the gain by selecting in the ADE window: Results => Direct plot => Gain).

NOTE: In AC simulations the small-signal input should be small enough that the circuit transfer function can be found using a linear time-invariant model, in other words the circuit should not become non-linear due to the input signal (or better, the non-linearity should be so small that it can be ignored).
If in doubt you can always do a TRAN (transient) simulation to confirm that the circuit is working as it should.



TRAN simulation plot example

TRAN Analysis

Finds the transient response of a circuit over the time interval you specify, using the DC operating point as the initial condition unless you specify a different initial condition. (see image on the right)




XF Analysis

You first specify which node is the output of the circuit, the simulator then finds the individual transfer functions from every independent source (or ground) to the output (there is also an option to find the transfer function from any node to the output). Like the AC analysis it is a small-signal analysis.
Note that it works differently compared to an AC simulation, which instead finds the transfer function from a single source to any node in the circuit.

This analysis is especially useful when you want to calculate the PSRR and CMRR; you run only one simulation and can then plot the following using the calculator:
PSRR+ = db(getData("/Vidiff" ?result "xf") - getData("/Vp" ?result "xf"))
PSRR- = db(getData("/Vidiff" ?result "xf") - getData("/Vn" ?result "xf"))
CMRR = db(getData("/Vidiff" ?result "xf") - getData("/Vicm" ?result "xf"))
Differential gain = db(getData("/Vidiff" ?result "xf"))

where:

  • Vicm is the input common mode voltage
  • Vidiff is the diffrerential voltage source
  • Vp is the positive supply voltage
  • Vn is the negative supply voltage

Note that the same results could be obtained with multiple AC simulations, where you would have to change the input source at each simulation (by setting it's 'AC magnitude' parameter to 1 while every other source has 'AC magnitude' = 0).



Noise Analysis

Computes the noise at the output of a linear and time-invariant circuit that is linearized around a DC operating point.
Use this analysis to get the noise figure (NF), noise factor, input/output referred noise and noise transfer function.


PSS Analysis (Spectre RF)

Computes the periodic steady-state of a circuit at a specified fundamental frequency.
It firstly determines the fundamental frequency of the circuit, which is a multiple of all source frequencies (the input sources need to be coperiodic); Then it evaluates the circuit for one period of the common frequency, adjusting this period untill all voltages and currents fall within a specified tolerance between 2 consecutive periods: call this period Tperiod. This means that the steady-state is a periodically time-varying operating point with period equal to Tperiod.
This analysis is required by the periodic time-varying analyses like: PAC, PXF, Pnoise.
It is a large-signal analysis.
Use this analysis for circuits like switched-capacitor filters, mixers, frequency multipliers/dividers, oscillators and other circuits that perform frequency conversion, where a sinusoidal input results in an output containing harmonics.



PAC Analysis (Spectre RF)

This analysis is similar to the AC analysis in the sense that the circuit is firstly linearized around it's steady-state operating point, however with PAC the circuit needs to be linearized around a periodic time-variant steady-state operating point using a PSS analysis and then a small-signal analysis is performed, while in an AC analysis the steady-state operating point is at DC and the small-signal analysis is done on a linearized and time-invariant circuit model.

NOTE: Like AC simulations, PAC simulations work well when the small-signal input is small enough that the circuit transfer function can be found using a linear model, in other words the circuit should not become non-linear due to the input signal (or better, the non-linearity should be so small that it can be discarded). This does not apply to the large signals (for example the local oscillator input in a mixer) whose effects are taken into account during the linearization phase and then 'discarded' during the small-signal analysis. Before performing a PAC analysis, a PSS analisys is required.



Pnoise Analysis (Spectre RF)

This simulation is similar to the Noise analysis, but computes frequency conversion effects, noise folding, aliasing.
For example it simulates the noise at the output due to a noise source that is bias dependent, such that it's noise is modulated due to the (periodic) time-variance of the operating point and transfer function.


QPSS window

QPSS Analysis (Spectre RF)

Computes the quasi-periodic steady-state of a circuit working at multiple unrelated frequencies, in other words the difference with a PSS analysis is that the input signals do not have to be coperiodic.
It is a large-signal analysis, however only one input must be defined as a large signal: all the other inputs must be sinusoidal and smaller than that one (moderate).
You can select which signal is defined as large or moderate in the QPSS window (see image on the right)
Use this analysis for circuits like switched-capacitor filters and mixers, and circuits that have multitone frequency conversion effects.


QPAC Analysis (Spectre RF)

Similar to PAC analysis, but includes the frequency translation effects of the quasi-periodic time-variance of the operating point.
Before performing a QPAC analysis, a QPSS analisys is required.



QPnoise Analysis (Spectre RF)

Similar to Pnoise, but includes the effect of a quasi-periodic time-variance of a noise source whose noise is modulated by the time-variance of the operating point.



To be continued...




Cadence Tips

Cadence Virtuoso schematic copy-paste

Copy/paste between two schematics in Virtuoso Schematic Editor

  • open both schematics
  • in the schematic page you want to copy from: press 'c' and select the schematic part to copy
  • a yellow rectangle shows the selected area (see image)
  • click on one of the selected components, those surrounded by a white box (see image)
  • go to the schematic page in which you want to paste the selection
  • left mouse button click to paste
  • if the selection is not visible press 'ESC'




Add a new PS printer
You may want to add a PS printer to plot your schematics to a PS (PostScript) file instead than sending them to a phisical printer.
To do this, create a file named .cdsplotinit in the home directory with this text:





Cadence Virtuoso active plot window

Plot more runs of a simulation on top of each other
in Analog Design Environment :

  • simulate with 'Netlist and Run'
  • go to Results => Direct plot => Main form and select what you want to plot
  • check the 'Add To Output' checkbox
  • select on the schematic the node/pin
  • in the 'Plotting Mode' menu select 'Append'
  • in the 'plot' window, check that on the top right of the window that it is marked 'Active' (see image)
  • from now on, when you run a new simulation, the new plot should appear on top of the old one




Cadence ADE Calculator Cadence ADE Calculator

Plot voltage or current from the calculator
Use these equations in the calculator:

Transient simulation
voltage : ( VT("/Vnet01") - VT("/Vnet02") ), where net01 and net02 are the names of the nets connected to it's terminals
current : IT("/V0/PLUS") or IT("/V0/MINUS"), where V0 is the name of the component (a voltage source in this case ) and PLUS, MINUS are the names of it's terminals
...

DC simulation
Voltage : VDC("/Vnet")
Current : IDC("/V0/PLUS")
...

AC simulation
Voltage : VF("/Vnet")
Current : IF("/V0/PLUS")
Gain [dB] : dB20(VF("/Vnet")), when 'AC Magnitude' is set to 1 in the signal voltage source)
Phase : phase(VF("/Vnet"))
...

DC sweep simulation
Voltage : VS("/Vnet")
Current : IS("/V0/PLUS")
...

DC Operating Point simulation
Click on the OP button, then select a component on schematic: a list of paramteres is shown (see image on right for the case of a mosfet).
Useful especially while using the parametric analysis tool, to plot e.g. the gm of a mosfet vs drain current

After entering the equation in the calculator, click on the 'Plot' button to plot or the 'Print' button for a numerical result.


Cadence root directory (on UNIX/Linux systems)
The install directory is usually defined in the variable CDS_INST_DIR:   e.g.   /opt/Cadence,   /opt/cds/doc/   or   /opt/CDS/doc/
To find out the actual directory on your system, type in the terminal the following command:
echo $CDS_INST_DIR



Cadence documentation directory (on UNIX/Linux systems)
The documentation is usually in : $CDS_INST_DIR/doc/   e.g.:   /opt/Cadence/doc/
See also: Cadence manuals for the Virtuoso platform: list of titles and filenames




Cadence printvs

Export Data to Octave/Matlab or a spreadsheet
in the Calculator :

  • a) enter the equations for the output signals you are interested in, OR
    b) click on the wave button and then click on a waveform in the Waveform window if you want to save the data of an already plotted waveform, OR
    c) in the Results Browser window, double click on the required signal
  • click on the 'printvs' button
  • enter a range of values for your output signal variable e.g. frequency for an AC simulation, time for a TRAN simulation,
    the X-axis variable in a plotted waveform... then click OK (see image on the right for a TRAN simulation)
  • in the Results Display window that will appear, click Window => Print and then select Print To => File
  • enter a filename for the output file

You can then import the file into Octave/Matlab or Libreoffice; it is an ascii text file with a header (containing the actual calculator command
used) and 2 columns representing the X and Y=f(X) values, where for example X could be time and Y could be the voltage of some net at time X,
depending on the equation you entered in the calculator.

NOTE: MS Excel and Libreoffice Calc may expect the comma ',' instead of the dot '.' for the decimal separator depending on the localization, just use the "find and replace" function to convert.

Below you find an example of the output from printvs for a DFT: on the first column is the frequency and on the second the value of the DFT at that frequency, in dB.




The Spectre save Statement
With a save statement you can save signals for individual nodes and components, it is useful when you want to save a signal that is not automatically saved during a simulation, for example the drain current of a mosfet.
In this case, just create a text file with extension .scs (e.g. my_save.scs) with the following content:

save M1:d

where M1 is the component name and d is the terminal name.
Include this file in ADE via Setup => Model Libraries => Browse.

More save statement examples
Statement Description
save NAME Save voltage of a node named NAME
save Q1:currents Save all terminal currents of component Q1
save Q1:static Save resistive terminal currents of component Q1
save Q1 D2:oppoint Save all signals of component Q1 and only the operating-point parameters of component D2



Cadence software and file types
These are some Cadence software packages:
Virtuoso Schematic Composer : IC schematic editor
Virtuoso Layout : IC layout artwork editor
Spectre : Circuit Simulator
Assura : layout verification and extraction tool integrated with Virtuoso AMS (is an extension of Diva)
Diva : interactive verification tool for analog/mixed-signal and full-custom designs
ViVA : Virtuoso Visualization and Analysis, it is the name of waveform viewer, results browser and calculator from IC6.1
Encounter: complete "RTL to GDSII" suite (floorplan, place & route, power distribution, clock distribution, ...) for SoC


Cadence executables:
cdsdoc : Cadence online documentation
icca (Integrated Circuit Cell Assembly) : Cell-based chip assembly (place and route)
icds (Integrated Circuit Design System) : front end design
icfb (Integrated Circuit Front-to-Back ) : analog design (from schematic entry and simulation to layout)
icms (Integrated Circuit Mixed Signal) : mixed-signal and microwave design (from schematic entry to simulation)
msfb (Mixed Signal Front to Back) : mixed-signal and microwave design (from schematic entry to layout)


These are the most common filetypes used by the Cadence Virtuoso suite:

Cadence File Types
Extension File type
.cdb (Cadence Data Base): used up to version IC5.1 as database format
.oa (OpenAccess format): used from version IC6 as database format
.pcf Process Corner file (to simulate parameter variations during wafer fabrication)
.dcf Design Corner file (same as .pcf, but this file can be modified for a specific design without affecting every other design)
.scs (Spectre Circuit Simulator): contains the model used when simulating a component
.lib Library file: could be a device library like analogLib.lib (for simulations) or a configuration file for libraries like cds.lib
.gds IC layout artwork file, see: GDSII on Wikipedia
.rsf Run-Set file used in Assura layout verification tool to store rules



Using .scs models
You can use symbols from another library in the schematic (e.g. from analogLib) and then change the parameter 'Model name' of the device in its CDF (Component Description Format) properties to match the one you read in the .scs file.
From the Command Interpreter Window, or CIW, (the first window that appears when you execute 'icfb') go to: Tools => CDF => Edit.


Draw a diagonal wire in a schematic
While drawing a wire, press 'F3' and change the Draw Modefrom the default value of "route" to another option that allows a diagonal wire placement.



Cadence ADE Calculator bandwidth function

Find the -3dB point (AC simulation)
in the Calculator :

  • select Special Functions => Bandwidth
  • Select the node (that you want to calculate the transfer function of) on the schematic
  • in the 'Bandwidth' window:
  • write 3 on the 'dB' textbox (see image on the right)
  • select Low-pass, High-pass or Band-pass on the 'Type' menu as appropriate (see image on the right)
  • click the 'OK' button
  • in the 'Calculator' window click 'Print' or check the "Evaluate Buffer" checkbox



Cadence acronyms
Some acronyms used in the Cadence software or documentation

Cadence acronyms and abbreviations
ADE Analog Design Environment Design and simulation suite for the Virtuoso platform (analog design from schematic entry to verification)
APS Accelerated Parallel Simulator Used to reduce simulation runtimes by spreading the simulation on multiple microprocessor's cores or clusters of computers
CDF Component Description Format It's a data format used to store the properties of a cell inside the DFII database
CDII Cadence Design Framework II Cadence's proprietary binary database format, supports two database types: CDBA (up to version IC51) and OpenAccess (from version IC6).
CDS Cadence Design systems Cadence, for short
CIW Command Interpreter Window It is the first window that appears after launching icfb from the terminal
DEF Design-Exchange Format Open specification for representing the layout of an IC, see: DEF on Wikipedia
EDI Encounter Digital Implementation SoC / Digital design platform
GDSII Graphic Database System II Binary database file format for IC layout artwork, see: GDSII on Wikipedia
icca Integrated Circuit Cell Assembly Cadence suite for Cell based chip assembly
icds Integrated Circuit Front End Cadence executable for front end design
icfb Integrated Circuit Front-to-Back Cadence executable for analog designs (from schematic entry and simulation to layout)
icms Integrated Circuit Mixed Signal Cadence executable for mixed-signal and microwave designs (from schematic entry to simulation)
LM Library Manager Cadence tool to can access the cells contained in the libraries
MMSIM Multi-Mode SIMulation A single simulator for analog, RF, memory and mixed-signal designs using a single database for netlists and models (end-to-end simulation)
msfb Mixed Signal Front to Back Cadence executable for mixed-signal and microwave designs (from schematic entry to layout)
PDK Process Design Kit It's a set of libraries (component models, physical verification rules, etc) necessary to design using a particular technology (e.g. TSMC 180nm)
OCEAN Open Command Environment for ANalysis Cadence scripting language for Virtuoso that is based on the SKILL language
OSS Open Simulation System Netlist format
RC RTL Compiler Synthesis and analysis tool for digital designs
XPS eXtensive Partitioning Simulator FastSPICE circuit simulator for verification of digital designs like memories and analog/mixed-signal SoC designs



Cadence manuals for the Virtuoso platform: list of titles and filenames
In this spreadsheet you will find the complete list of Cadence manuals for the Virtuoso platform (version IC5.x) with title and filename so they should be easier to find when needed.
To find for example where the calculator manual is on your system, now that you know it's named calc.pdf, you can use this command in the terminal:
find $CDS_INST_DIR -name calc.pdf
you would get as response something similar to:
   /opt/Cadence/doc/calc/calc.pdf

You probably have to ask your system administrator about the possibility to print a copy for personal use.
Note that the filename path could be different depending on your $CDS_INST_DIR variable: e.g. the file calc.pdf could be in /some/other/path/doc/calc/calc.pdf instead of /opt/Cadence/doc/calc/calc.pdf.

Note also that the manuals are copyrighted material and unfortunately cannot be "copied, reproduced, modified, published, uploaded, posted, transmitted, or distributed in any way, without prior written permission from Cadence".

CadenceDocsTitles.ods screenshot

CadenceDocsTitles.ods screenshot




Get version and subversion of Cadence executables
To get the version or subversion of executables like icfb, icms, spectre, layout, ...etc use these commands in the terminal:

  • icfb -V : for the Cadence release version, e.g: 5.1.0
  • icfb -W : for the Cadence release subversion, e.g.: 5.10.11.222.3.44
  • spectre -V : for the Spectre version, e.g: 5.1.0
  • spectre -W : for the Spectre subversion, e.g: sub-version 5.1.0.112233
  • ...etc



Cadence lock files
Cadence uses lock files to disable editing the same file from two instances of the program at the same time. The lock files have the same name as the open files but have the .cdslck extension. If Cadence crashes, the files that were open at the time would be still locked when it is restarted and, to continue working on those files, the edit locks (the lock files) need to be removed.
To remove the lock file(s) you can use the clsAdminTool utility from the terminal:

  • clsAdminTool -ale . (note the dot) to list all locked files in the current directory
  • clsAdminTool -are /path/to/dir to remove the locks for all files in a directory named 'dir'

By the way, if you really have to kill the Cadence executable because it looks like it did hang, use:
kill -HUP <icfb_PID_number>
instead of:
kill <icfb_PID_number>
so that it has a chance to close properly and to save the opened files: it also creates a file named panic.log in your home directory with the instructions on how to recover the files that were open at the time it was terminated.




Cadence Virtuoso edit all selected

If you cannot change a text in a textbox because it is greyed out
If you happen not to be able to edit text in textboxes, for example the instance name of a component or some text in a textbox, because it is greyed out, it is probably because in the Apply To field you selected all selected: change it to only current (see image on the right).













Cadence Virtuoso parametric analysis

Run a parametric analysis
With a parametric analysis you can execute an analysis (AC, DC, TRANS, ...) multiple times while incrementally changing a parameter (e.g. a mos transistor channel width) for every execution
Start with assigning a variable to a parameter in the schematic (e.g use Wtrans in place of the width of a mos transistor), then
in Analog Design Environment :

  • go to Variables => Copy from Cellview (to inform Spectre about the variable)
  • set the appropriate simulation (AC, DC, TRANS, ...)
  • go to Tools => Parametric Analysis (see image on the right)
  • add the variable name to sweep (in this case is Wtrans)
  • add the range
  • go to Analysis => Start
  • you can now plot any simulation result against the parameter being sweeped




Cadence Virtuoso load simulation

Save or load a Spectre simulation
When you save or load a simulation in ADE, you can choose which substates to save/load by selecting the checkbox next to them in
the What To Load/Save section (see image at the right).

Main substates description
Analyses analyses defined in the Choose Analysis form
Model Setup/ Model Path model setup and path directory
Simulator Options settings for the Simulator Options form
Graphical Stimuli setup of the Graphical Stimuli form
Variables design variables defined in the ADE window
Convergence Setup Node Set, Initial Condition, and Force Node settings and the calculated DC and transient solutions
Conditions Setup settings for the Conditions Setup form
Outputs settings for saved (written to disk), marched (plotted in the Marching Waveform window while the
simulation is still in progress) or plotted (plotted in the Waveform window after the simulation ends) outputs



Some useful Bash shell commands (for Unix/Linux systems)
These are simple shell commands that can be useful in a Unix/Linux environment: before executing any command make sure you understand it and, more importantly,
always make a backup, using for instance the following command: zip -r backup-of-foo.zip foo

  • If you have changed a Spectre model library name and want to change the new path for every simulation in your project directory: /home/user/.artist_states/MY_PROJECT/
    You would need to edit a text file named modelSetup in every simulation subdirectory (e.g: /home/user/.artist_states/MY_PROJECT/LNA/spectre/IP3/modelSetup,
    /home/user/.artist_states/MY_PROJECT/LNA/spectre/GainNF/modelSetup, ...etc) and change the line:
    "/home/user/my_OLD_model_lib/Spectre/mylib.lib.scs" "tt"
    to: "/home/user/my_NEW_model_lib/Spectre/mylib.lib.scs" "tt"; instead you can use the following command:
    find . -name modelSetup -exec sed -i 's.my_OLD_model_lib.my_NEW_model_lib.' '{}' \; where the . (dot) after find means "the current directory"

  • To copy all pdf manuals for Spectre (uppercase/lowercase insensitive) from all the folders the install directory path to a directory named CadenceDocs:
    for nomefile in $(find /opt/cds/doc -iname *spectre*.pdf); do cp --parents "$nomefile" CadenceDocs/; done This would copy files such as /opt/cds/doc/spectrehdlref/spectrehdlref.pdf or /opt/cds/doc/spectreRF/spectreRF.pdf to CadenceDocs/

  • Lock files are created when a file is opened (to avoid two instances of Cadence trying to modify the same file) but are not automatically deleted in case of a system crash
    or when the cadence executable has not been closed properly (by terminating icfb with kill -9 <pid>, for instance), resulting in the following message the next time they are opened:
    *WARNING* file /home/user/... is already locked by some other process. To remove those lock files you can use clsAdminTool (see Cadence lock files) or this command:
    find . -name "*.cdslck" -exec rm -fi '{}' \; This would delete all lock files it finds in the current working directory and it's subdirectories.

  • ...




Cadence Virtuoso Results Browser

Use the Results Browser to load a waveform into the calculator
In the Analog Design Environment go to Tools => Results Browser, then in the Results Browser window (see image on the right), click on schematic => psf => Run1 then select the simulation (dc, psc, qpss, ...etc) and double click on the variable you are interested in: it will appear in the Calculator input text box, so you can then plot it using the Plot button, print with the Printvs button, etc.

When you save the simulation results using Results => Save in the ADE window, they will appear in the Results Browser.

















Downloads

Description File type   Version     Download  
SPECTRE_Analysis_Parameters.ods : describes analysis parameters for the most common SPECTRE analyses Spreadsheet v 1.0 download icon
SPECTRE_Components_Parameters.ods : describes components parameters for components like: MOS, BJT, Diode, Resistor, port, ...etc Spreadsheet v 1.0 download icon
CadenceDocsTitles.ods : List of titles and filenames of the Cadence manuals for the Virtuoso platform Spreadsheet v 1.0 download icon
Cascaded_systems_IP3-NF-Gain_calc.ods : Calculator for Gain, IP3, NF, P1dB in cascaded systems Spreadsheet v 0.1 download icon
Spectre_DFT_calcs.ods : Calculator for DFT simulation parameters Spreadsheet v 1.1 download icon





Creative Commons License
The content on this page is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

This website is not optimized for any particular browser or device.