Tutorial on Cadence Design Tools

amountdollΗλεκτρονική - Συσκευές

2 Νοε 2013 (πριν από 4 χρόνια και 9 μέρες)

193 εμφανίσεις

UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
1

of
14

ECE
219

CMOS RFIC Design

(2013)




Tutorial on Cadence Design Tools


Prof. Patrick Yue


(
cpyue
@ece.
ucsb
.edu)




In
ECE
219
, we will use Cadence tools to do transistor
-
level circuit design and
simulation. Cadence provides a powerful integrated working env
ironment for
analog/digital/mi xed
-
signal i ntegrated circuit design, simulation, layout and
verification. For more information, please refer to its official website:
http://www.cadence.com
. For the purpose of this c
ourse, we will only focus on
those tools relevant to analog and RF integrated circuit design.


This tutorial will cover most of the features that is sufficient for you to fi nish
ECE
219

homework assignments and design projects. It is di vided into two pa
rts:




Part I: Setting up your environment in EC
I

machi ne. Please carefully follow
this section to start Cadence correctly, si nce various versions of C
adence
currently co
-
exist in ECI

machines.



Part II: We will go through an example to simulate the noi
se figure of a
passive bridge
-
T attenuator, which is actually a question i n homework #1.
We will also talk about how to get more help from Cadence


For those of

you
who
are already familiar with Cadence, you will still need to
follow

Part I.

UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
2

of
14

Part I.

Environment Setup


1.

First of all, you need to have an EC
I

account

at


https://accounts.engr.ucsb.edu/create_account.php



2.

type the command to use
enhanced version of

the C shell


>tcsh


3.

Create a directory where you want to save your work, for example,
ece219
:


>mkdir
ece219



4.

Enter the directory you just created:


>cd
ece219



5.

Copy
necessary

files to
the directory you just created:

>
cp /eci/tech/ECE594/setting/log018.scs ./

>
cp /eci/t
ech/ECE594/setting/tsmc018.scs ./

>
cp /eci/tech/ECE594/setting/.
cdsinit

./

>
cp /eci/tech/ECE594/setting/.cdsenv ./


6.

Download t
hree
files to
the directory you just created

from our website
:

.cshrc .cshrc_219

cds.lib


7.

Run th
e following two

command
s


>

source .cshrc_219

> source .cshrc

(You may see some warning
information
, please just ignore them.)

> setenv CDS_HOME /ece/cadence/IC5141

> set path = ($path $CDS_HOME/tools/bin $CDS_HOME/tools/dfII/bin)


8.

Run this command

to start Cadence


>

icfb &


9.

Wait f
or a while, and the CIW wi ndow of Cadence should pop up. If not,
please check if you have followed the above procedures.



10.


Next time when you plan to run Cadence, simply repeat
2,
4, 7, and 8


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
3

of
14

You can fi nd all devices (transistors, resistors, capacitor
s and i nductors etc.)
needed in a standard device library called “analogLib”, which is provided by
Cadence. For transistors, you will need device models. The models we are
going to use i n this class come from TSMC
-
0.18μm CMOS process.
You should
copy t
h
e model file

tsmc018.scs


along with the libiary file

cds.lib


to your
working directory (i.e.,
ece
219

i n above example)
.

It contains several sections to
account for different process corners. We will use the typical process
parameters, so you need to
specify section “
tt
” when you set up model libraries
for the simulation later on in Cadence.


One example library (EXAMPLE_ECE219) has already been added, so you
can use it to run directly.


** Please keep in mind that you have signed the MOSIS Non
-
Discl
osure
Agreement in order to access the technology file. So, you are not allowed
to share this file with anyone else. **


11.
When you first log into the Library Manager, you will need to create your own
working library.
For some of you who cannot create l
ibrary, this is an issue due to
the build
-
in NCSU library. There is a straight way to solve this issue,

as
shown
below:


(1) From the menu of CIW: Tools

Library Manager

(2) A window will pop up, as below:


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
4

of
14

(3)
From the menu of
Library Manager
:
Edit


Lib
rary

Path.
A window

will pop
up as below:




Please type in the name and path of library you want to create (Please note that
to replace the path to your OWN one)


You may need to refresh the Library Manager (View


Refresh) so as to see the
new library y
ou just created

UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
5

of
14

Part II. An Example


In this section, we will fi nd the noise figure of a bridge
-
T passive attenuator,
and briefly introduce how to get help from Cadence documentations.


1.

As Cadence is runni ng, in the CIW (Command Interpreter Window), c
lick
“File > Open…” in the menu bar.




Figure 1. Cadence CIW window


2.

The “Open File” window wi ll pop up. Select “Library Name” as “test”, and
choose “bridge
-
T” as “Cell Name” from the list at the right side. Make sure
“View Name” is “schematic”. Cl
ick “OK”.




Figure 2. Open File Window from CIW


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
6

of
14

3.

The “Virtuoso Schematic Editing” window will appear, and you wi ll see a
bridge
-
T passi ve attenuator, which simply consists of three resistors.
There are also two additional instances “PORT0” and “PORT1
”.




Figure 3. Virtuoso Schematic Editing Window


4.

Here are some basic schematic editing shortcuts you should know: To
select an instance, simply point and click on it. To i nsert a new i nstance,
press “i” and you will see a new window named “Add Insta
nce” (Figure 4).
Fill in proper “Library”, “Cell” and “View” names, and click on the
schematic window, you finish to insert a new instance, and you can press
“Esc” to close “Add Instance” window. To delete the i nstance, first select it
and then press “d”
. To change the properties of the i nstance, first select it
and then press “q”; an “Edit Object Properties” wi ndow (Figure 5) will open,
and you can modify the properties of the instance. To copy an i nstance,
first select it, press “c”, and then click i n

a blank area in the window. To
rotate an instance, first press “r” and then click it. To flip an i nstance, first
select it, press “m”, and then press “R”. To wire the devices together,
press “w” and click the two points you want to connect. To undo wh
at you
have done, press “u”. All of these commands can be found i n the “Edit”
menu. These shortcuts are summarized in Table 1.

UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
7

of
14



Figure 4. Add Instance Window


Table 1. Commonly
-
used Shortcuts for Schematic Editing

Shortcut (keyboard)

Action

i

inser
t new instance

d

delete instance

q

modify the properties of an instance

c

copy an instance

r

rotate an instance

m + R

flip an instance

w

connect two nodes

u

undo


parameterized components: use
pPar("
CDF_parameter_name
")

i
n the properties form
for t
he parameter. For example, parameterize the gate width with
W=pPar("wp").
When
Create Cellview
-
From Cellview
is used, the symbol will contain this parameter, which
can be adjusted in the the parent cell.


If the cell is used as a top level cell, the paramete
r
can be specified by adding a user property to the
Edit

Properties

Cellview...
dialog
box to give the parameter a value.

UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
8

of
14




in Composer, use a string for the parameter that you wish to vary.


For
example, specify the width of a transistor t
o be "wp".



in Analog Artist, go to Variables®Edit... and enter each variable and its
value.


You can also use Variables®Copy from Cellview to copy any
unlisted variable in the schematic to the Design Variable pane.



look under the Analog Artist section to s
ee how to sweep variables
(Parametric Analysis)



Figure 5. Edit Object Properties Window from Virtuoso

5.

Let’s go back to the “Virtuoso Schematic Editing” wi ndow. In the menu
bar, click “Tools > Analog Environment”, and a new window called
“Cadence Analo
g Design Environment” will appear.

UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
9

of
14



Figure 6. Cadence Analog Design Environment Window


6.

In the menu bar, click “Setup > Model Libraries …”. Another wi ndow
called “Model Library Setup” pops up. Click “browse” button, and you will
see a new wi ndow sim
ilar to a file browser. Choose “tsmc018.scs”, and
click “OK”. The browser closes and we return to the “Model Library Setup”
window. Don’t forget to fill “tt” i n the “Section (opt.)” field! Click “Add”, and
then click “OK”. The “Model Library Setup” wi
ndow closes and we return
to “Cadence Analog Design Environment” wi ndow. By the way, we
actually don’t need any device model for this example, since we only use
ideal resistors and ports. However, you certainly will need this step in
most of your home as
signments and design projects.


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
10

of
14



Figure 7. Model Library Setup Window


7.

Now we are in “Cadence Analog Design Environment” window. Click
“Analyses > Choose …” i n the menu bar, and “Choosing Analyses”
window will appear. Check “sp” in the “Analysis” li
st. You will see the
content of the lower half window changes as you choose different
analyses. Now, we are going to setup the parameters for an “S
-
Parameter Analysis”. Click “Select” button in the “Ports” field, and then
click on i nstances “PORT0” and
“PORT1” in the “Virtuoso Schematic
Editing” window. Press “Esc” before you return to “Choosing Analyses”
window. You now should see the “Ports” has been filled with “/Port0
/Port1” as shown in Figure 8. Select “Sweep Variable” as “Frequency”.
Select “S
weep Range” as “Start
-
Stop”, and fill “Start” and “Stop” with “1k”
and “1G”, respecti vely. This means we wi ll sweep the frequency range
from 1
-
kHz to 1
-
GHz. Choose “Sweep Type” as “Logarithmic” from the
drop
-
list, check “Points Per Decade”, and fill the
blank field with “100”.
Check “yes” for “Do Noise”. Select “Output port” by first clicking “Select”
button and then i n the schematic wi ndow clicking “PORT1”. Do the same
to select “Input port” as “PORT0”. The finished “Choosing Analysis”
window will lo
ok as that shown in Figure 8. Finally, click “OK”.


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
11

of
14



Figure 8. Choosing Analysis Window


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
12

of
14

8.

Now, we return to “Cadence Analog Design Environment” wi ndow. At the
right side of the window, you will find a column of buttons. Click the one
like a traffic
signal with green light. The function of the button will show up
as you place your mouse on it. So, as you can see, we are goi ng to
“Netlist and Run” the simulation. Wait for a second, Cadence will first
generate the netlist of the circuit and then run
the simulation. As the
simulation is running, a new window (Figure 9) pops up and let you know
the progress of the simulation. It won’t take a long time to finish, and you
can look for such a sentence in the CIW window:



simulation completed successful
ly.





Figure 9. Output Log Window


UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
13

of
14

9.

Going to “Cadence Analog Design Environment” window, in the menu bar,
choose “Results > Direct Plot > Main From …”. A “Direct Plot Form”
window will pop up. Check “NF” from the list of the “Function”. Check
“dB10” a
s the “Modifier”. Click “Plot” button. A new “Waveform” wi ndow
will appear, and the noise figure of the bridge
-
T attenuator against the
frequency will be plot in this window.




Figure 10. Direct Plot Form Window


Now, we fi nish our simple example. I
n fact, all of above procedures can be
found in Cadence help documentation. In the CIW wi ndow, click “Help >
Cadence documentation” at the upper right hand corner. After waiting for a while,
you will see a new window. Choose “Docs by Product” in the sec
ond pop
-
up
menu. Search for “Spectre RF”. Double click on “Table of Contents” and a web
-
browser wi ll open*. Look for the chapter of “Simulating Low noise amplifier”, and
look at the section of “Linear Two
-
Port Noise Analysis with S
-
Parameters”. You
wil
l fi nd what we just discussed to do a noise
-
figure analysis. “Spectre RF User
UCSB ECE 219


Prof. Patrick Yue

Modified by Li Sun, Jan
2013



Page
14

of
14

Guide” contai ns all aspects of RF IC simulation, and the best of all, it has step
-
by
-
step examples to help you to simulate LNA, Mixed, VCO etc.


*If the html version of the hel
p page does not work, see the follow i nstructions
to directly view the manual in PDF format.


To get more help


In this class, we wi ll focus on using SpectreRF to simulate various RF circuits,
in particular, LNAs, mi xers, and VCOs. You can go through a st
ep
-
by
-
step
tutorial for each of these circuits by fo
llowi ng the SpectreRF manual. Run
acoread to view the following file:

/eci/ECE594/cadence/ic5141/doc/spectreRF/spectreRF.pdf

In the Table of Content,
click on “Simulating Lo
w
-
Noise Amplifiers”, “Simulating
Mixers”, and “Simulati ng VCOs”. Go through each of the exercises one by one
and you will become familiar with the tool
.