CadenceVirtuosoTutorial CSU2020
CadenceVirtuosoTutorial CSU2020
A BASIC TUTORIAL
Updated: Spring 2020
Originally Written by:
Sanja Manic, John Blatt, Diana Peterson, Tucker Kern, Lang Yang, Ming-Hao Cheng, and William Tedjo
Updated by: Ming-Hao Cheng
TABLE OF CONTENTS
TABLE OF CONTENTS .......................................................................................................................................... 1
CHAPTER I: CADENCE SETUP .............................................................................................................................. 2
1. Initial Setup (first time only) ................................................................................................................. 2
2. Running Cadence Virtuoso (every time you want to run Cadence) .................................................. 2
3. Starting a New Project .......................................................................................................................... 2
4. Exiting Cadence .................................................................................................................................... 3
CHAPTER II: COMPONENTS .................................................................................................................................. 4
1. Library Browser .................................................................................................................................... 4
2. Components in AnalogLib.................................................................................................................... 4
3. Component Setup and Examples ........................................................................................................ 5
4. Wiring and Save Schematic ................................................................................................................. 8
CHAPTER III: SIMULATION - INTRODUCTION .......................................................................................................... 9
1. ADE L Simulator.................................................................................................................................... 9
2. Single-Point DC Analysis ................................................................................................................... 10
3. Preparing Schematic for More Advanced Analyses ......................................................................... 11
4. Transient Analysis and Example ....................................................................................................... 13
5. AC Analysis and Example .................................................................................................................. 14
CHAPTER IV: SIMULATION METHODS - FUNDAMENTAL ........................................................................................ 18
1. Variable Sweeping .............................................................................................................................. 18
2. Parametric Analysis ............................................................................................................................ 20
CHAPTER V: SIMULATIONS METHODS - ADVANCED ............................................................................................. 22
1. Monte Carlo (MC) Analysis ................................................................................................................. 22
Page 1 of 25
CHAPTER I: CADENCE SETUP
1. Initial Setup (first time only)
• Follow the link to the ENS page with instructions to connect to one of the linux server
(Remote Desktop or X2Go is recommended):
https://www.engr.colostate.edu/ens/how/connect/serverlogin-linux.html
Follow this step if you are connecting from outside of campus:
https://www.engr.colostate.edu/ens/how/connect/serverlogin-win.html
List of ENS Linux server and server load (select server with low work load):
https://www.engr.colostate.edu/ens/info/researchcomputing/linuxcompute.html
• For Remote Desktop, open a terminal by clicking this icon at the top bar of your remote window.
The main window shows warning and error messages throughout your simulation work.
Page 2 of 25
Insert name for your library. It is recommended to use different library for different course (e.g. ECE202,
ECE331, etc.) Do not use any special characters, empty space, or naming that starts with number,
underscore _ is permitted. Select, “Attach to an existing technology library”.
4. Exiting Cadence
• Save existing works, close Cellview windows, and close Cadence main windows.
• Do not close or terminate the terminal window directly.
• Do not close or terminate remote computer session directly.
• Always exit the Cadence Virtuoso Main window first. Then, terminate terminal and followed by
remote computer session.
Page 3 of 25
CHAPTER II: COMPONENTS
1. Library Browser
Add instance: Create – Instance… Or use “I” button for shortcut to the instance library.
2. Components in AnalogLib
analogLib Component
res Resistor
ind Inductor
cap Capacitor
xfmr Transformer
vdc DC voltage source
idc DC current source
vsin AC sinusoidal Voltage
isin AC sinusoidal Current
vpulse Voltage wave source
ipulse Current wave source
VCVS Voltage Controlled Voltage Source
CCVS Current Controlled Voltage Source
VCCS Voltage Controlled Current Source
CCCS Current Controlled Current Source
switch Ideal switch
gnd Common ground
Page 4 of 25
3. Component Setup and Examples
a. Resistor – res
To select a resistor, select the component Cell: res, and View: symbol (always select symbol).
Then, fill in the resistor value.
Do not type the units (“Ohm”, “V”, “F”, etc.) and empty space “ “.
You are only allowed to use prefixes (p – pico, u – micro, m – milli, k – kilo, M – mega, G – giga).
For examples: 47u (forty-seven micro), 1m (one milli), 10G (ten giga).
For implementing the switch, it is necessary to define open-close voltages and resistances. Pulse
generator (vpulse) controls the voltage in time across the switch.
Page 5 of 25
c. Pulse Voltage source – vpulse
Voltages that control states of switch are set up as greater than Open/Closed voltage from previous
slide. Settings of Voltage 1 and Voltage 2 controls if switch was first open and then closed or other way
around.
Period and Pulse width define the frequency and duty cycle. Rise time and Fall time should be in nano
seconds to simulate a sharp-edged square-wave, or equal to Pulse width to generate a triangular-wave.
Use vsin for pure sinusoidal wave and vdc for constant dc voltage.
VCVS VCCS
Page 6 of 25
e. Opamp Implementation with VCVS
OpAmp in theory has infinite gain. When implementing an OpAmp using VCVS, define egain to be
large – at least 1000.
“Check and save” button alerts you Button “Save” Select for wire,
if there is a mistake made in the only save your connecting your
circuit and save your schematic. schematic components in
(recommended) without checking. schematic.
Note: Errors will prevent the circuit from saving, but warnings will not. It is good practice to fix all
warnings or at least know exactly what they are from. Always check your warning and error messages
in the Cadence Main window.
Page 8 of 25
CHAPTER III: SIMULATION - INTRODUCTION
1. ADE L Simulator
a. In the schematic window, open Analog Design Environment L (ADE L)
b. Check your model library before any simulation run. Go to Setup → Model Libraries … Set the model
file Section to tt. Model containing Section: dio is not required if you don’t have any diode in your circuit.
OR
Page 9 of 25
2. Single-Point DC Analysis
All design simulation should be started with this step.
a. Setting up a simple DC analysis – to show a steady-state node voltage and current flowing through
components, select “dc”, check “Save DC Operating Points” and “enable”, click OK.
b. Run and show the result – to run, hit the “Netlist and Run” button in the right side of ADE L window.
To show the result in your schematic, go to Results – Annotate – select “DC Node Voltage” and “DC
Operating Points”.
The schematic is now showing node voltages and current flowing through each component. Select
“Design Defaults” to remove the annotation.
For variable sweeping with the DC analysis, refer to the “Other Simulation Features” section.
Page 10 of 25
3. Preparing Schematic for More Advanced Analyses
This is required for simulation other than the “Single-Point DC Analysis” shown in 2.
a. Wire labelling
Select one of the methods below to open the wire naming window. Hit “L” for shortcut.
OR
Fill the “Names”, click “Hide”, and make sure to align your cursor (shown as a tiny yellow box) to
the wire to be named, right click.
Repeat for all important wires. The labelling would be very helpful in analyzing your simulation and
debugging your circuit.
Page 11 of 25
b. Select output to be plotted (probing)
Before running the simulation, you need to select net (to show the voltage) and/or node (to show
current). In ADE L window, Outputs – To Be Plotted – Select On Schematic.
Click on wires to select net, click on the red squares at the edge of a component to select node.
Hit “esc” button after you’re done with the process.
The example below shows VCE and VBE wires are selected to show voltage and the C node of
component Q0 (Q0/C) is selected to show current. Notice the difference between current and voltage
probing. Probing for current always shown as a circle around the red square, voltage probe does not.
The list of probed nets and nodes should show up in the Output section.
Check this list every time before running your experiment and delete any unnecessary probe,
especially if you do not recognize the name.
Page 12 of 25
4. Transient Analysis and Example
This analysis generates outputs over time (in second), or time domain analysis. To setup the transient
analysis, select “tran” and fill the “Stop Time”, check “enable”.
For example:
Do not run transient for 1 (second) if you have
circuit components at kHz or more.
Instead,
Page 13 of 25
5. AC Analysis and Example
This setup below generates outputs over a range of frequency, or frequency domain analysis.
AC Stimulus
Even though you are allowed to use
any other ideal voltage sources, it is
recommended to use vsin to
generate a voltage AC stimulus. It’s
useful to remind you that you have a
AC sinewave in a particular place in Labels
your circuit.
The result below was executed from 1Hz to 1GHz. This figure shows the magnitude of sinusoidal wave
over a range of frequency. The two curves are Vin (was set at 1mV as a stimulus) and Vout (amplified to
Page 14 of 25
26.7mV) in voltage scale. We can say that the signal gets amplified 26.7 times at a very low frequency
(usually called DC-gain). Notice decrease of gain towards the higher frequency.
In AC analysis, Cadence does not show the DC component / voltage biases as outputs, but it takes
account the DC component into calculations. As output results, it shows only the magnitude of AC
sinusoidal waves.
Before performing every AC analysis, it is recommended to run a Single-Point DC analysis first to
ensure correct DC voltages in your circuit. It is also possible to run multiple analyses at the same time.
At last, we are interested in the gain interpretation. Usually, amplifier gain is shown in decibel (dB) scale, a
logarithmic scale, to better represent very high gain.
Page 15 of 25
• Click the “Evaluation” button to plot the expression you just created.
This figure shows only the expression for gain in decibel.
To save and reuse your gain expression, click the Send Expression button, to send the equation to ADE
L Simulation – Outputs window.
Page 16 of 25
Right click and select edit to change the name.
At last, put a check mark on your “GAIN” expression to show only the gain in dB scale automatically after
running AC analysis.
This step can be used with other expression you created in calculator and with all other type of analyses
(dc and tran). This step is a must once you are performing repetitive analysis on your circuit; it
automates the circuit design process.
Page 17 of 25
CHAPTER IV: SIMULATION METHODS - FUNDAMENTAL
1. Variable Sweeping
Variable Sweep is useful to extract circuit characteristic based on a range of value of a component. This
method can be applied to all type of analysis (DC, AC, and trans).
Use naming convention that is specific to your component, for examples: Rload (load resistor), Cload
(load capacitor), Wn1(width of nmos number 1), etc.).
Do not use empty space and special characters, only alphabets and number are allowed. Do not
start your variable name with numbers. The variable is case sensitive.
b. Import variable and set up the nominal value in ADE L.
It is recommended to put a
value that is inside your
variable range.
For an example, Rload is
being swept from 0.5k to 1.5k,
put 1k for the initial value.
Page 18 of 25
c. Set up the analysis and sweeping range.
Again, this example is for sweeping a resistor (Rload) with DC analysis.
This method is available for AC and tran analyses and all other components (voltage in a source,
capacitor value, width of a transistor, etc).
Page 19 of 25
2. Parametric Analysis
Parametric Sweep provides another dimension of sweeping. This method can be applied on top of variable
sweeping with all type of analysis (DC, AC, and trans).
An example below shows RC low pass filter using AC analysis. The goal is to varies the cutoff frequency
by varying capacitor, C1.
a. Initial Run
It is recommended to run a simple test run once, to check whether you have correct schematic and
save the schematic. It is not possible to run parametric analysis successfully if the simple test
run does not work.
Cadence uses
this value (1p)
as C1 to plot
the frequency
response.
b. Parametric Analysis
Once a the initial simulation is successfully run, select Tools – Parametric Analysis…
Page 20 of 25
This parametric setup would set variable C1 to parametric sweeping with Range of 1pF to 1uF, Step
Mode: Decade (10x), and 1 Step/Decade. So, the simulation would run AC analysis with C1 values:
1pF, 10pF, 100pF, 1nF, 10nF, 100nF, and 1uF. This is an example, you have to select your own
value for From, To, and Step Mode according to your simulation needs.
Parametric sweeping outputs of RC filter frequency response with multiple values of C1.
Page 21 of 25
CHAPTER V: SIMULATIONS METHODS - ADVANCED
1. Monte Carlo (MC) Analysis
MC is a statistical method to analyze the variation and mismatches due to variation in semiconductor
fabrication. MC analysis is useful to predict the characteristic of your circuit. A good example of MC
analysis is in design of precision current mirror, where current accuracy is the main objective of your
specification.
The output of MC analysis would be similar to parametric analysis, multiple output values over a range of
set variable. In this example, our variables (automatically set by MC) are small random variations of
transistors Width and Length of transistors.
a. Modify components
In schematic window, manually replace ALL nmo2v and pmos2v components to nmos2v_mis and
pmos2v_mis, respectively. Save and check the schematic. Select each component and add “_mis” to
its Cell name.
b. Launch ADE XL
In schematic window, Launch – ADE XL – Create a New Window. Create a new test by clicking “here” in
Tests section. Then, a window similar to ADE L should show up. It called “ADE XL Test Editor”.
You may upload the previously saved ADE L setup file in Session – Load State... It should upload initial
variables value, analyses, and outputs. In this example, set Single-Point DC analysis (see
Simulation: Introduction – 2), remove all other type of analysis and sweeping.
Page 22 of 25
c. Adjust model library
Change section from tt to mc as shown below.
Click OK, you may save the state and close the ADE XL Test Editor window.
Page 23 of 25
e. Setup Monte Carlo and run
In main ADE XL window, select Monte Carlo Sampling in the pull-down menu. Then, select parameter
setting button . Set values and check the boxes as shown below.
Hit the run button to initiate MC analysis. This setup runs 100 times Single-Point DC analysis, it may
takes up to few minutes to finish. Track the progress in the Run Summary sub-window located in
bottom left.
f. Analyze result
Select the Result Browser Button . Under dcOp subfolder, find the component name, and double-
click the signal (voltage or current) to be plotted.
This is an example, you
have to select the correct
output based on your
schematic.
In this case, the selected
signal is M1.m0:d, which is
current of the drain of
transistor M1. m0 indicates
that there is only one
transistor model inside of
M1, you don’t have to worry
about this for now.
First, open calculator, select the original curves, use histo() function and set number of bins (nbins),
minimum and maximum value. Adjust these values as necessary. At last, evaluate the plot.
Evaluate.
mean
Repeat the process with stddev() to show the sigma (σ) value.
These values suggest that the transistor M1 drain current has mean (µ) of 50.3µA with standard
deviation (σ) of 0.8µA. Translation to English: statistically, if you were to fabricate this transistor 1000
units, 682 (68.2%) of them would have drain current between 49.5µA and 51.1µA. The remaining 318
(31.8%) transistors would have drain current below 49.5µA and above 51.1µA.
Recall that in a normal/gaussian distribution, 1σ-value is 68.2% of area under the curve. You have to
multiply 1σ-value by 3 to get the 3σ-value, which is 99.7% area under the curve.
Page 25 of 25