KEMBAR78
Cadence Tutorial | PDF | Spice | Amplifier
0% found this document useful (0 votes)
306 views46 pages

Cadence Tutorial

The document provides instructions for using Cadence design software to design and simulate a simple common source amplifier circuit. Key steps include: 1. Creating a new library and schematic cell in Cadence. 2. Adding transistor, resistor, voltage source, and supply net components to the schematic. 3. Connecting the components to design a common source amplifier circuit and setting component properties. 4. Configuring the simulator settings and adding TSMC 0.3μm process model files for simulation.

Uploaded by

the_tigdra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
306 views46 pages

Cadence Tutorial

The document provides instructions for using Cadence design software to design and simulate a simple common source amplifier circuit. Key steps include: 1. Creating a new library and schematic cell in Cadence. 2. Adding transistor, resistor, voltage source, and supply net components to the schematic. 3. Connecting the components to design a common source amplifier circuit and setting component properties. 4. Configuring the simulator settings and adding TSMC 0.3μm process model files for simulation.

Uploaded by

the_tigdra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Lab I - CADENCE Tutorial EEE 433/591

The objective of this lab is to learn CADENCE and design a simple Common
Source Amp and simulate the IV-Curves for the Basic Transistor.

CADENCE 

Cadence ICFB (IC Front to Back environment) is a software package used for
Integrated Circuit design and simulation. This software features a complete suite
of tools including schematic capture, simulation, layout, and extraction. Several
simulation engines are available: spice, hspice, spectre, etc. These engines
require model files that specify the device modeling parameters, such as oxide
thickness (Tox) and electron mobility (Uo).

1. We will be using the TSMC 03u process available in the NCSU Design
Kit.
2. We will also be using spectre for simulation.

The following tutorial will guide you through the basic setup and operation of
Cadence ICFB. You will build a schematic and perform several analyses.

Quick Tips
I. Should the Schematic not display correct, select
Window -> Redraw from the Schematic menu
II. Schematic view has many editing operations that are very helpful. For
example copy, paste, undo, rotate.
III. These operations are accessible through any of the following: the Edit
menu, the side bar buttons, and shortcut keys.
IV. IMPORTANT: Hit the “Esc” key to exit an operation.

1
Lab I - CADENCE Tutorial EEE 433/591

1. Cadence Startup:

a. Cadence is started from a terminal


i. To open a terminal: right click on the desktop and select
“new Terminal”. Or, press “Ctrl”+”t” on the keyboard
b. Running Cadence for the 1st time
i. Several configuration files must be copied to your home
directory. This process is automated by running the following
command:

c. Starting Cadence after the 1st time


i. Open a new terminal.
ii. Changes directories to “cadence”

% cd cadence5
% source /usr/local/cadence/NCSU_151/ncsu.cshrc

iii. Execute icfb:

% icfb&

2. Startup Screens:

When ICFB starts, two windows appear: the ICBF Log window (Figure 1) and the
Library Manager (Figure 2). The Log window is the main window for ICFB. User
preferences and other options are accessed through its menus. The Log window
also displays useful output, such as if a simulation run completes successfully or
unsuccessfully.

Figure 1. The ICFB Log Window

The Library Manager provides organization for components and design files.
Cadence files are organized into “Libraries.” Cadence files are structured objects
called “Cells”. Each “Cell” can have several different “Views”. These “Views” are
associated with a particular Cadence tool, such as the Layout editor and the
Schematic editor.

2
Lab I - CADENCE Tutorial EEE 433/591

Figure 2. The Library Manager Window

3. Create A New Library:

a. Select File -> New -> Library ...


in the either the Library manager or Log window. The Create Library
window appears.

3
Lab I - CADENCE Tutorial EEE 433/591

Figure 3 Create Library Window


b. Enter a library name.
c. Choose “Attach to existing tech library” under Technology
library.
d. Choose “NCSU_TechLib_tsmc03” for the library. This is the process we
will be using for this class.
i. By attaching a tech library to our library, all the cells we will create in
our library will be associated with this 0.3u process.
e. Click the “OK” button. Your new library will be added to the list in the
Library Manager.

4. Create A New Schematic:

a. Click on the name of the library you just created. We will now add a new
cell to this library.
b. Select File -> New -> Cell View ...
in the Library Manager. The Create New File window appears.

4
Lab I - CADENCE Tutorial EEE 433/591

Figure 4. Create New File Window


c. Enter the schematic name in “Cell Name”.
d. Choose Tool “Composer-Schematic”.
e. The View Name should be “schematic”, which associates this cell view
with the Schematic editor.
f. The Library Name should be the name of the library you created.
a. If not, click the “-“ next to the Library Name and select your library
from the list.
g. Click “OK”. The Composer-Schematic Window will appear.

5
Lab I - CADENCE Tutorial EEE 433/591

Figure 5. Composer-Schematic Window

5. Adding Components to the Schematic:

a. Select Add –> Instance from the schematic menu. The Component
Browser and Add Instance windows will appear.
1) There are many shortcut keys to menu items. Usually it is faster to
use the shortcut keys instead of using the menus.
2) Press the “i” key to add an instance
b. Choose the “NCSU_Analog_Parts” library.

6
Lab I - CADENCE Tutorial EEE 433/591

Figure 6. Component Browser and Add Instance Windows

c. Select “N_Transistors” from the list.


1) Click on “nmos4”
2) Switch to the Schematic Window and place the transistor by
clicking somewhere on the schematic.

7
Lab I - CADENCE Tutorial EEE 433/591

d. Press the “Esc” key to stopping adding instances.


e. Click on the nmos component you just placed. The component will be
surrounded by a white border, when it is highlighted.
f. Press the “q” key to edit the component properties.
g. Change the Width to 10u (it will be set to 9.975u, which is the closest
multiple of 0.3). In this example, leave the Length at the process minimum.
But, in your design you may want to change the length also.

8
Lab I - CADENCE Tutorial EEE 433/591

Figure 7. Add Instance Window

9
Lab I - CADENCE Tutorial EEE 433/591

h. Press “i” on the keyboard to add more components.


i. Select “R_L_C” from the list to place resistors, inductors, and capacitors.
1) Add a 50k resistor (“res”) to your schematic.
2) To change the component values, click on the part in the schematic
and press “q”. Remember to press “Esc” on the keyboard to stop
adding instances.
j. Select “Voltage_Sources” from the list.
1) Add a “vsin” source
i. Set the “AC Magnitude” to 1. This value is used in AC
(Frequency Domain) Simulations.
ii. Set the “Amplitude” to 2m and the “Frequency” 10k. These
values are used in Transient (Time Domain) Simulations.
iii. Apply a gate voltage: set the “DC Voltage” to 0.5
2) Add a “vdc” source with a 2.5 “DC Voltage”
k. Select “Supply_Nets” from the list. These components allow us to connect
nodes (nets) together without drawing lines.
1) Add “gnd” and “vdd” components to the schematic.
l. Hit the “Esc” key in the Schematic Window, when you are finished placing
components.

6. Connecting Components in the Schematic:

Connect the component with wires.

a. You can add wires by selecting Add -> Wire, then left click where you
want you end points. Hit “Esc” when you are finished adding your wire.
b. It is much easier to just left click and drag the component’s node (the red
squares) to form lines.
c. Connect the components as shown in Figure 8.

10
Lab I - CADENCE Tutorial EEE 433/591

Figure 8. Common Source Amplifier

d. You can label “in” and “out”, by selecting Add -> Wire Name
e. Remember to connect the bulk to the source.

f. Save your work by selecting Design -> Check and Save

****NOTE: It is important to “Check and Save” every time you make a change to
the schematic. If you don’t, the simulator will not complete successfully until the
schematic is “Checked”. There are design rules for schematic entry. When you
perform a “Check”, your schematic is compared with the design rules.

7. Simulator Setup:

a. From the Schematic menu select

11
Lab I - CADENCE Tutorial EEE 433/591

Tools -> Analog Environment. The Analog Design Environment


window will appear as shown in Figure 9.

Figure 9. Analog Design Environment Window


b. Select Setup –> Simulator/Directory/Host ... in the Analog
Environment window.
c. Choose spectre and click OK.

Figure 10. Choosing a Simulator Window

d. Select Setup –> Model Libraries


e. Add the TSMC 0.3u model files for NMOS and PMOS devices.

12
Lab I - CADENCE Tutorial EEE 433/591

/usr/local/cadence/NCSU/ncsu-cdk-
1.5.1/models/spectre/standalone/tsmc25N.m
/usr/local/cadence/NCSU/ ncsu-cdk-
1.5.1/models/spectre/standalone/tsmc25P.m

Figure 11. Add Model Library File Window

8. DC Analysis:

a. Select Analyses –> Choose in the Analog Environment window.


b. Click on “dc”
c. Select “Save DC Operating Point”.

13
Lab I - CADENCE Tutorial EEE 433/591

Figure 12. Analyses Setup Window


d. Click “OK”
e. Select Simulation -> Run in the Analog Design Environment window
f. Once the simulation is complete click on
Results -> Annotate -> DC Node Voltages and
Results -> Annotate -> DC Operating Points. Now the DC
voltages, currents and other information will appear on the schematic.

14
Lab I - CADENCE Tutorial EEE 433/591

NOTE: If the Annotate section is not highlighted, then the simulation was
unsuccessful. Look in the ICFB Log window for more information about the
reason for the failure.

Make sure that the DC conditions of the circuit are correct, before performing
other analyses.

9. Transient Analysis:

a. Select Analyses -> Choose … in the Analog Environment window.


b. Click on “tran” and enter the stop time for the simulation.

15
Lab I - CADENCE Tutorial EEE 433/591

c. Click OK
d. Make sure you have entered the Amplitude 10m and Frequency 10K for
the vsin source in the schematic. These values are used in the Transient
Analysis.
e. Select Outputs -> To Be Plotted -> Select on Schematic.
f. Return to the Schematic editor, and select the desired outputs.
1) Click on a wire or a wire name to choose a voltage.
2) Click on a node (the red squares) to select a current.
3) When you are done press the “Esc” key.
g. Select the input voltage and the output voltage.
h. The outputs will appear under the “Outputs” section in the Analog Design
Environment window.

16
Lab I - CADENCE Tutorial EEE 433/591

Figure 13. Outputs added to Analog Environment

Note: The input and output nodes are named as “in” and “out” in the schematic
for convenience. Otherwise, you would get the default net names.

i. Click on Simulation -> Run.


j. The Waveform window will appear.

17
Lab I - CADENCE Tutorial EEE 433/591

Figure 14. Transient Waveforms


k. Select Axis -> Strips to view the plots on separate axes.

Figure 15. Transient Waveforms Strips

18
Lab I - CADENCE Tutorial EEE 433/591

10. AC Analysis:

a. Select Analyses -> Choose


b. Disable the Transient analysis and choose AC analysis.

c. Enter the Sweep Range (100 to 1M).


d. Make sure you have entered AC Magnitude for the AC source as 1. This
means the output AC Magnitude will be the gain of the circuit.
e. Select Simulation -> Run

19
Lab I - CADENCE Tutorial EEE 433/591

f. If you still have the outputs selected, then the voltage magnitude will be
plotted:

Figure 16. AC Voltage Magnitude, Frequency Response


g. We can also plot the Magnitude in dB. Select Results -> Direct
Plot -> dB20 Magnitude in the Analog Environment Window.
h. Click on the output wire and then press the “Esc” key.
i. The Magnitude in dB is plotted.

20
Lab I - CADENCE Tutorial EEE 433/591

Figure 17. AC Magnitude dB, Frequency Response

21
Lab I - CADENCE Tutorial EEE 433/591

11. Parametric Analysis:

We can also assign a variable to component parameter, such as the resistance


value of a resistor. Then, we can use the Parametric Analysis tool to change the
variable value and run a simulation of each value.

a. Change the value of Rd to “my_Rd_variable” on the schematic.


b. Select Variables -> Copy From Cellview in the Analog
Environment window. The variable “my_Rd_variable” should show up in
the list of Design Variables. To assign a value, double click the
“my_Rd_variable” in the list.

c. Select Tools -> Parametric Analysis ... from the Analog


Environment menu.

22
Lab I - CADENCE Tutorial EEE 433/591

d. Enter the Variable Name “my_Rd_variable”.


e. Choose a Range from 10k to 50k with 5 total steps.
f. Select Analysis -> Start in the Parametric Analysis window.
g. Plot the Magnitude as performed in the AC Analysis section.

Figure 18. AC Simulation Using Parametric Analysis

23
Lab I - CADENCE Tutorial EEE 433/591

12. Saving State of the Analog Design Environment:

We can also save the current state of the Analog Design Environment. This will
save all the settings, such as the simulator and model library files selected. It will
also retain the analyses, variables, and outputs selected. Then, the state can be
reloaded at a later time, and all of the saved settings will return. You can
continue working exactly where you left off without having to choose the settings
again.

a. Select Session -> Save State in the Analog Design Environment

b. Now “state1” will be associated with this current design. The next time you
open this design schematic you can reload this state.
c. Do so by selecting Session -> Load State in the Analog Design
Environment

24
Lab I - CADENCE Tutorial EEE 433/591

13. Plotting DC Transfer Characteristics:

Use the following procedure to generate the DC Transfer Characteristic of an


amplifier. This can be accomplished by doing a DC sweep of the input voltage.
The DC Transfer Curve provides a lot of information about the amplifier:
input/output dynamic ranges and gain.

a. Consider the CS Amplifier below

b. Setup a DC Sweep Analysis for the DC voltage of the input source.


c. Plot the output of the amplifier (in this case labeled “out”).

25
Lab I - CADENCE Tutorial EEE 433/591

Figure19. DC Transfer Characteristic

14. Plotting VI Characteristics:

Use the following procedure to generate VI plots for a transistor. This can be
accomplished by doing a DC sweep of the voltage across drain and source.

a. Build the following schematic

26
Lab I - CADENCE Tutorial EEE 433/591

b. Open the Analog Design Environment. Select the spectre simulator and
add the model library file.
c. Choose a DC analysis

27
Lab I - CADENCE Tutorial EEE 433/591

d. Select “Component Parameter” from the “Sweep Variable” section, as


shown above.
e. Press the “Select Component” button.
f. Then return to the Schematic Editor and click on the DC voltage source
connected to the drain.

28
Lab I - CADENCE Tutorial EEE 433/591

g. Select the DC voltage from the “Select Component Parameter” window,


shown above. Click “OK”.
h. The Component Name and Parameter Name will appear in the Choosing
Analysis window.
i. Enter a Sweep Range from 0 to 2.5. And, click “OK” to close the Choosing
Analysis window
j. In the Analog Design Environment, select Outputs -> To be
Plotted -> Select on Schematic
k. Return to the Schematic Editor, and click the drain node (red square) to
select the drain current as the output. Press “Esc”.
l. In the Analog Design Environment, the drain current node will appear in
the Outputs section.

29
Lab I - CADENCE Tutorial EEE 433/591

Figure20. Analog Design Environment: Drain Current Output


m. Then run the simulation.

Figure 21. VI Characteristic for Single VGS

30
Lab I - CADENCE Tutorial EEE 433/591

n. We can also perform a Parametric Analysis sweep on the value of VGS.


a. In the Schematic Editor, change the value of the DC source to a
variable, “my_VGS”
b. Add the variable to the Analog Design Environment, Variable ->
Copy from Cellview
c. Open the Parametric Analysis tool

d. Enter the variable name and the sweep range


e. Select Analysis -> Run

Figure 22. VI Characteristics for Several VGS

31
Lab I - CADENCE Tutorial EEE 433/591

15. Plotting Rin and Rout:

Use the following procedure to plot the input and output impedances of an
amplifier. This can be accomplished by doing a AC sweep of the input or output
Magnitude.

a. Consider the circuit below for Rin:

b. Setup an AC Analysis that sweeps the Magnitude of the AC input source.

32
Lab I - CADENCE Tutorial EEE 433/591

c. Specify the Frequency of the signal (10k), and enter the Sweep Range.
d. Click “OK”.
e. In the Analog Design Environment, select Outputs -> Save All

33
Lab I - CADENCE Tutorial EEE 433/591

f. We need to save the AC currents, so select “yes” for “Select AC terminal


currents (useprobes)”. Click “OK”
g. Setup the drain node as an output by selecting it on the schematic.
h. Run the simulation.

34
Lab I - CADENCE Tutorial EEE 433/591

Figure 19. Slope = 1/Rin


i. You can quickly measure the slope of the plot by using the Delta Tool:
select Trace -> Delta from the menu.
j. Rout can be found in a similar fashion. Consider the circuit below

k. Setup the analysis like we did for Rin, but sweep the AC Magnitude of the
AC source at the output.
l. Run the simulation

35
Lab I - CADENCE Tutorial EEE 433/591

Figure 20. Slope = 1/Rout

36
Procedure  for  plotting  Gm  curves  
1. Gm vs Vov ( constant W/L )

A. Draw the schematic as shown below

Spectre
B. Name a variable for vgs, for eg. X+0.49. 0.49 is the vth.
C. Open Analog environment. Set the simulator to SPICE and add the correct
model libraries as mentioned in the cadence tutorial.
D. Goto Analyses->Choose, select dc, save DC operating point.
E. Goto Variables->Copy from cellview. Set the value of x to 0.5
F. Simulation->Netlist and Run.
G. Goto Tools->Calculator.
H. Select info, in the info toolbar select op as shown below.
Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524

I. After clicking on op, select the transistor from the schematic


J. Select gm from the list as shown below. Click OK

K. In the analog environment, click on Outputs->Setup


Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524

L. A window pops up as shown below. Give the name as gm for eg. and click on
Get Expression. Click OK.

M. In the analog environment, click on Tools->Parametric Analysis.


Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524
N. Give the variable name as x ( the variable that needs to be swept ). Vary x
from 0.5 to 0.6 in 20steps.

O. Click Analysis->Start

P. The plot is as shown below.


Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524

2. Gm vs Id ( with constant W/L )


A. Draw the schematic as shown below

B. Give Vg as 1V so that Vgs is greater than Vt.


C. Give a variable for the current source.
D. In the analog environment, set the expression for gm in the same way as
shown for gm vs vgs.
E. Give a initial value of 20uA for the current source and do a DC analysis.
F. Do a parametric analysis for the current source by varying from 0uA to
500uA.
Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524
G. The plot is as shown below.

3. Gm vs Vov ( constant Id ).
A. Draw the schematic as shown below.
Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524

B. Give the variable name for width of the transistor.


C. In the analog environment, set the expression for gm in the same way as
shown for gm vs vgs.
D. Give a initial value of 10u for the width and do a DC analysis.
E. Do a parametric analysis for the width by varying from 1u to 50u in 20 steps.
The plot is as shown below.

F. In the dc analysis window select design variable as w and vary w from 1u to


50u in 20 steps.
Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524

G. Select the vgs node as outputs to be plotted.


H. Netlist and Run the simulation. The plot is as shown below.

I. In the waveform window click on gm or /net5 in the above 2 graphs, then


click Tools->Table.
Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524

J. Click OK. Select File->Save as CSV in the cadence5 folder. Do this for both
the waveforms.

K. Select File->Save as CSV in the cadence5 folder. Do this for both the
waveforms.

Actually, you do not have to use MATLAB.Instead,


you may make figures in EXCEL after data
extraction. If you are familiar with MATLAB, the
command "csvread" can be used to read a comma
separated value file (pure data). Type "help
csvread" in MATLAB command window for more
L. Delete the first line in both the csv files. information.
M. Matlab can be invoked by typing matlab in the shell window.
Lab I - CADENCE Tutorial, MOS IV Curves, CS Basic Amp Sims
Kiaei – EEE 433/591/524
N. Select the aic.m file by clicking on File->Open

O. The aic.m file has the matlab commands that reads the csv files, picks gm and
Vgs and plots gm Vs Vgs.
P. The plot is as shown below

You might also like