You are on page 1of 16

Before you start this tutorial download (ami06.olb and ami06.

lib) from you class folder

How to use PSPICE


I.

Launching PSpice
a. Launch Cadence:
School Version: Start Release 16.3 Design Entry CIS
Demo Version: Start Cadence- OrCAD 16.5 Lite OrCAD Capture CIS Lite
b. School: From the Pop-up Menu select:
Studio Selection Suite: PCB Design CIS XL, hit <OK>
c. Create a new project
i. On the top toolbar select: File->New->Project

You will see the pop-up menu shown below


ii. Select a path for your project. (If you are running the tool at school, you need to
browse and place the part in your student account on the H: drive)
iii. Enter a name for your project
iv. Make sure to select Analog or Mixed A/D, otherwise you will not be able to
simulate
v. Click <OK> to close the window

d. School: You will see a pop-up menu select: Create blank project

II.

Creating a Schematic

(Note the schematic that is produced might not be appropriate for PCB layout)

Adding Libraries and Placing parts

e. To place a part:
Hit bindkey p OR
Select Place part icon (toolbar on rhs) OR
Select Place->Part (Top toolbar)

Place part
icon

The parts that you will be adding are in Libraries that need to be loaded.

f. To add a Library:
a) Select the add Library Icon in the Place Part Pop-up menu

Add Library
icon

ii. In the Browse File pop-up menu browse to Add the library path (see below)
Demo version path: C: OrCAD/OrCAD_16.5_Lite/tools/capture/library/Pspice
School version path: C: Cadence/SPB_16.3/tools/capture/library/Pspice
iii. Click on the blank part of the window and hit <ctrl a> to select all the libraries
(see below)
iv. Select Open to add the selected libraries (see below)

Add path

click here
and select
<ctrl a>

Repeat steps f a-d to add the ami06.olb library that you downloaded into your H: drive account
The libraries have now been added and you can place parts

g. Placing Parts
a) In the Place part pop-up menu enter the name of the part
that you wish to add (Here we have entered vdc)
ii. IMPORTANT: You can find the some parts
in several libraries. Select the part Vdc
from the library Source. (Notation:
VDC/SOURCE)
iii. Hit <enter> to add the part
iv. If the part was not in the design cache you
will see a pop-up menu. Hit <yes> if you
get this menu.
v. Move your cursor on the schematic to
where you want to place the part. Click
your mouse at the location
vi. You will continue to be able to place parts
that are of the type that you selected. Hit
<esc> to end placing parts.
vii. If you wish to rotate or flip a part as you
place it use the following bindkeys
Rotate
r
Horizontal flip h
Vertical flip
v

Select the
part vdc
from the
SOURCE
library

Common Editing Commands


Move parts:
Select the part (or parts) you wish to move with your mouse
Drag the part(s) to the new location
Undo: hit ^z
Copy:
Select the part (or parts) you wish to copy with your mouse
Hit ^c
The object in now in the clipboard
If you are writing a laboratory report this clip board is available to Microsoft products. So
you can use this command to paste entire schematics in your reports (^v).
Paste:
Hit ^v
Move your cursor to where you want to place the object that is in the clipboard
Click your cursor at the desired location.
Rotate
Select the desire part Hit bindkey r OR from the main menu: Edit-> rotate
Mirror (flip) horizontally or vertically
Select the desire part. From the main menu: Edit-> mirror
Delete
Select the desired portion of the circuit. Hit <delete>
Using the common editing commands to place the following parts on the schematic
M 2

A M I0 6 P
V1
0Vdc

W =
L = .6 u

V2
0Vdc

M 1

A M I0 6 N

W =
L = .6 u

Part Name
Demo and School Libraries
Vdc
Source
NMOS
Ami06
PMOS
Ami06
h. Change the following part properties:
a) Double click on 0Vdc and change the value of one DC voltage source to 5
b) Double click on W= and change the width of the NMOS transistor to 3u
viii. Double click on W= and change the width of the PMOS transistor to 6u

Connecting parts with wires


After placing the parts you will need to connect them with wires (also called nets).

Adding wires:
i.

Select the Place wire icon (toolbar on rhs) OR use bindkey

w.

Place wire
icon

j.

Draw the wires (shown below)

a) Click your mouse at the starting position of your wire


ii. Move (do not drag) your mouse to the location where you want a bend. Click
your mouse. (you may repeat this step for multiple bends)
iii. Move (do not drag) your mouse to the end location click again.
iv. Hit the <esc> key to exit the place wire command.
Add wires to create the following connectivity
M2

A M I0 6 P
V1
5Vdc

Click mouse (starting point)


move mouse
Click mouse (bend)
move mouse
Click mouse (end point)
Hit <esc> to end command

W = 6u
L = .6 u

V2
0Vdc

M1

A M I0 6 N

W = 3u
L = .6 u

Naming wires:
It is much easier to maintain a design if you name the wires (nets) on your schematic. Try to create schematics
that are readable and less cluttered with wires

Below are two equivalent schematics. Which is more readable/maintainable?

Two IMPORTANT ideas


1) If wires have the same name (net alias) they are viewed as being connected
2) To simulate a PSpice schematic there needs to be a net named 0 (zero)

k. Naming wires
a) To name a wire begin by:
Selecting bindkey n OR
Selecting the place net alias icon (rhs toolbar) OR
Selecting the Place->net alias (top toolbar)
Note: do NOT use the place text icon. PSpice text offers no functionality. It is, however, helpful for
annotating schematics with comments.

ii. A pop-up menu will appear. In the menu enter the name you(Vin for
this example)
iii. Click your mouse on the net that you wish to name Vin
iv. Hit <esc> to end the place net alias command

Place net
alias icon

Place text
icon

Name the wires (Vin, Vo, Vdd) on your schematic as follows

Note these wires have the same


name and are connected
Vdd
M2

Vdd

V in

V1
5Vdc

V in

A M I0 6 P

Vdd
W = 6u
L = .6 u

Vo

V2
0Vdc

M1

A M I0 6 N

W = 3u
L = .6 u

Adding Ground
Again, to simulate a schematic there needs to be a net named 0 (zero). Using the place wire alias you can name
a wire zero, or you can place a part that will do the same thing

l. Add a ground:
a) Selecting bindkey G OR place ground icon (toolbar on rhs)

ii. In the resulting place Ground pop-up menu - Select:


0/CAPSYM
iii. Hit <OK> to start placing parts

iv. On your schematic add ground parts as shown.


v. Hit : <esc>to end the place ground part command
Vdd
M 2

Vdd

V in

V1

V in

Vdd
W = 6u
L = .6 u

A M I0 6 P

Vo

V2

5Vdc

0Vdc

M 1

W = 3u
L = .6 u

A M I0 6 N

0
0

m. After you have created your schematic save your work Top Toolbar: File->Save
8

III.

Running a DC Sweep

Placing Probes
To automatically plot results when a simulation is complete place probes. Voltage probes plot
voltages and current probes, currents.
n. Place a voltage probe and current probe as shown below. Note current probes must
be placed on the pins of devices (the very end)

Current probe icon


Voltage probe icon

Voltage probe
Current probe

Simulating
o. To simulate from the top toolbar select Pspice->New Simulation Profile
p. Enter a name
q. Click on create to close the window

Adding a model file


The behavior of transistors is defined in a model file which needs to be added
r. In the Simulation Settings Window tab to Configuration Files
s. Select Include
t. Click on Browse

u. At the bottom of the resulting window (see below) select All Files (*)
v. Find the ami06.lib file that you previously downloaded and select it
w. Click Open to close the window

x. Back in the Simulation Settings Window click on Add to Profile

10

Running a DC sweep
y. Back in the Simulation Settings menu (shown below) tab to Analysis
z. Select DC sweep analysis type
aa. Specify that you wish to sweep a voltage source
bb. Specify the voltage source that you wish to sweep (V2 or the one connected to Vin)
cc. Specify the Start and stop voltages as well as the voltage increment
Note: Spice understands m to be 10-3
dd. Click on <OK> to close the window

ee. To simulate click on the run Pspice icon at the top of the schematic

Run Pspice
icon

ff. The simulation will run


Note if your simulation fails check for errors: from top toolbar: Window->Session Log

11

gg. If your simulation runs successfully the voltage and current will be plotted as shown
below (the current is so small in comparison to the voltage it will appear to be zero)
We will delete the voltage trace and add another trace using a different technique

Deleting Traces
hh. Click on the V(Vo) icon at the bottom left of the simulation window (as shown below)
ii. click <delete> to delete it

V(Vo)
icon

Plotting Expressions
In this example you will plot the static power dissipation of the CMOS inverter
jj. In the top toolbar of the Allegro AMS Simulator window select: Trace->Add Trace
You will see the Add Traces pop-up menu shown below: Voltages and currents are listed on
the left and functions on the right
kk. Enter the expression as indicated
ll. Select <OK> to close the window and plot the expressions

12

Using Cursors
Cursors can be used to determine precise simulation values.
mm. To activate the cursors click on the toggle cursor on icon at the top of the
Simulation window
nn. Click on the cursor point icon

cursor point icon


Toggle cursor on

Cursor X,Y data


displayed here

There are two cursors CURSOR 1 and CURSOR 2. CURSOR 2 is controlled with the left mouse and
CURSOR 2 with the right.
oo. Affiliate cursor 1 with the trace of ID(M1) by clicking on its icon with the LEFT mouse
button (see below)
pp. Affiliate cursor 2 with the trace of Vdd by clicking on its icon with the RIGHT mouse
button (see below)
qq. Click on the simulation result with the RIGHT mouse button to define the position of
cursor 1. Crosshairs will be shown. X and Y values for this trace at the position of
the cross hairs are displayed at the bottom of the graph. The crosshairs can be
moved by dragging the mouse with the right button.
Note: The position of the cursor 2 is similarly controlled with the left mouse button

13

Place cursor2 or cursor1 crosshairs by clicking on graph with


left or right mouse. Drag left or right mouse to move cursor.

select colored icon with RIGHT mouse button to affiliate with cursor 1
select colored icon with LEFT mouse button to affiliate with cursor 2

Cursor data displayed here

IV.

Performing a Transient Simulation

Applying a Digital Input Pulse


rr. Return to the Schematic window
ss. Replace the DC voltage source connected to Vin with a Vpulse part from the Library
Source
Vdd
tt. Modify the Vpulse part properties as shown below
M 2
Vdd
Note: V1 is the first voltage
V2 is the second voltage
W = 6u
A M I0 6 P
L = .6 u
TD is the delay time
Vdd
V in
V in
Vo
TR is the rise time
V1
V
V
TF is the fall time
5Vdc
M 1
V2
V1 = 0
V2 = 5
PW is the pulse width
TD = 2n
TR = 100p
PER is the period
TF = 100p
PW = 5n
PER = 10n

uu. Apply voltage probed to the input and


output of the inverter (delete the current

W = 3u
L = .6 u

A M I0 6 N

probe)

V2

V1

TD
(delay time)

TR
(rise time)

PW
(pulse width)

TF
(fall time)

14

15

Performing a Transient Simulation


vv. To simulate from the top toolbar select Pspice->Edit Simulation Profile
ww.
Tab to Analysis
xx. Select a Time Domain (Transient) analysis type (see below)
yy. Specify a run time of 10n and a maximum step size of 10p
zz. Click on <OK> to close the window

aaa.

Click on the run PSPICE icon to run the simulation<OK> To close the window

Plotting using a strip chart format


bbb. After the simulation has run and the result have been plotted. In the top toolbar
of the SCHEMATIC sim window select Plot-> Add Plot to Window
ccc. At the bottom of your graphed results, select the V(Vin) icon
ddd. Hit <ctrl> x to cut
Select V(Vin) and
hit <ctrl>-x

eee.

Click on the empty plot and hit <ctrl> v paste the Vin plot in the empty window

Click mouse here &


hit <ctrl> v to paste

16