Cadence Tutorial
Cadence Tutorial
Cadence Tutorial
1
EECE 285 VLSI Design
Table of Contents
Purpose of Cadence
1) The Purpose of Cadence pg. 4
Linux
1) The Purpose of Linux
2) Basic Linux commands for running cadence
3) Logging onto cadence
4) Lock files
Navigating in Cadence
1) Icfb log pg. 3
2) Library Manager
3) Schematic, symbol and layout editing pg. 3
Building a symbol
1) Building the symbol for the schematic
2
EECE 285 VLSI Design
Design Rules
1) MOSIS design rules for 0.5m technology pg. 6-9
3
EECE 285 VLSI Design
Purpose of Cadence
1) Cadence is an Electronic Design Automation (EDA) environment in which different
applications and tools can are integrated together. This allows all the stages of IC design
and verification to be done in a single environment. The different tools are supported by
different fabrication technologies allowing for customization of the Cadence environment
to fit the particular technology.
Linux
1) Linux is an operating system that is a multi-user, multi-tasking system that can be used on
servers, desktops and laptops. Linux was originally developed at Bell Labs in 1969.
Linux is used to access cadence and manage the files in its libraries.
2) Basic Linux commands used for running cadence
A) Command: ls
Function: lists the files in the current directory
Example: ls
B) Command: pwd
Function: tells you what directory you are currently in
Example: pwd
C) Command: mkdir
Function: makes a new directory
Example: mkdir project (makes a new directory called project)
D) Command: cd
Function: takes into the specified directory
Example: cd NCSU_AMI06 (takes you into the directory called NCSU_AMI06)
E) Command: cd ..
Function: takes you back one directory
Example: cd ..
F) Command: mv
Function: moves a directory to the specified location
Example: mv adder adder2 (moves the directory adder to the current directory and
changes the name to adder2)
G) Command: cp
Function: copies a file
Example: cp ../multi . (copies the file named multi from the previous directory to the
current directory)
H) Command: gzip
Function: compresses files, so they take up less space
Example: gzip inv (compresses the file called inv)
I) Command: gunzip
Function: uncompresses files that have been compressed by the command gzip
4
EECE 285 VLSI Design
5
EECE 285 VLSI Design
Example: rm r nor (removes the directory called nor and all of its contents
V) Command: cp r
Function: copies a directory and all of its contents
Example: cp r HW5 (copies the directory called HW5 and all of its contents)
W) Command: history
Function: shows the list of the last 100 commands
Example: history
X) Command: find
Function: searches the current directory and all subdirectories for the specified file(s)
Example: find project3 (searches the current directory and all subdirectories for files
called project3)
Y) Efads
Z) Fewfds
AA)
3) Logging onto cadence
3.1) To log into cadence log onto polarbear and then a campus machine by using the ssh
Y command.
Then, use the command exec /bin/bash. In bash, use the command source soureme.sh
and then icfb&. This will log you into cadence.
7
EECE 285 VLSI Design
4) Lock files
4.1) If your file says "edit mode only" or otherwise does not respond, there is a
good chance you have a .cdslck lock on your schematic or layout file. So, before you
start and before you source the sourceme.sh file, type:
find $HOME -name \*.cdslck
The find command should show you where the cdsclk files are in your directory.
Delete (rm) these files, then you shouldn't have any trouble till the next time it
locks the files.
Navigating in Cadence
1) The icfg log is the window that gives you gives you a list of the actions that have taken
place in cadence, Figure 1. This most recent action is at the bottom of the list. This is
where you go to see the result of DRC and LVS checks. The file tab allows you to create a
new library or cell, import files, export files and open files in the library manger. The tools
tab gives you a list of the different tools that are available in cadence. The options tab
allows you to save the session and change the preferences.
8
EECE 285 VLSI Design
2) The library manager is where the libraries, cells and views are stored, Figure 2. If you
select a cell of one of the libraries you can view the different layouts (schematic, extracted,
layout, symbol, etc.) of that cell, by double clicking on the type of view. The file tab allows
you to create a new library, cell view and category, open a cell view, load or save defaults
or exit. The edit tab allows you to copy, rename, delete, change properties, access
permission and library path.
9
EECE 285 VLSI Design
3) The virtuoso schematic editing window is where the schematic is built. The buttons on the
left side are common used commands. To select an object, make sure that you do not have
other commands running by hitting the Esc button on the keyboard, and run the cursor over
the object and click on it, Figure 1.
There is a list of short hand keyboard commands that allows you to quickly call the
command. For example m is short for move, which will allow you to move an object.
These short keyboard commands can be found by going to the tabs at the top of the window
and looking at the right of the command, Figure 2.
10
EECE 285 VLSI Design
To move an object around go to the edit tab and select move, or use the short command of
m, and select the object you wish to move. To delete an object you can click on the
button to the left of the window and click on the object, select the object and hit the
delete button and the keyboard, or go to the edit tab and select the delete command and
click on the object you wish to delete. If you drag the pointer across the buttons on the left
side of the screen they will give a description for what they do . The
virtuoso symbol editing window is very similar to the virtuoso schematics editing window.
The symbol editing window is laid out the same way but has less functions. The virtuoso
layout editing window has is similar to the virtuoso schematic editing window but it also
has a LSW window that appears with it. This window is to select the different layers to the
parts of the transistor and connections between them. To select a layer, click on it in the
LSW window and then go to the virtuoso layout editing window and draw the rectangle for
that layer.
11
EECE 285 VLSI Design
If you want to view only one layer, select a layer from the LSW window and click on NV,
which will select only that layer.
12
EECE 285 VLSI Design
Then go to the virtuoso layout editing window and click . This will let you view
only that layer that was selected in the LSW window.
13
EECE 285 VLSI Design
Building a schematic
1) Creating a new library is the first part in building a new schematic. You can do this in one
of two ways, first you can create a new library from the Library Manager, or the CIW. In
either case select File->New->Library. This will bring up the create library window,
Figure 1. Enter the name of the new library, for example digital_lib, and select Attach
Existing Library. When there is no path entered, it will place the library in the directory
from which you started Cadence. If you started Cadence correctly, this will be your
Working Directory.
14
EECE 285 VLSI Design
Next, select Attach to existing tech library and select one of the available libraries.
Remember which one was selected because it will be required for simulation later, Figure 2.
2) The next step to creating a schematic is creating a new Cell View. This is done in the
Library Manger, but it can be done it two ways. First, select the Library in which you will
be adding this Cell. Second, either select File->New->Cell View from the Library Manger
or you can type the name of the new cell in the blank under Cell in the Library Manger and
hit the enter key. This will bring up a window in which you can specify the type of view
you are creating, Figure 3. Since we are creating an inverter, we will name the Cell inv. It
is good to give the cell a name that will help you remember what is in it.
In the Create New File window, select as the tool Composer-Schematic. This will cause
the View Name to be automatically filled with the name schematic. When you are finish
click the OK tab. This will close the current window and bring up the window in which we
will design the schematic of the Inverter.
3) Now we are ready to layout the schematic design of the Inverter. After creating the new
cell, a window opens in which we will create our schematic, Figure 4. This window is the
Virtuoso Schematic Editing window.
16
EECE 285 VLSI Design
The schematic level design is building the inverter from the transistor level. To add a
component click Add->Instance. This brings up the Component Browser and a window in
which you can specify the component to be added, Figure 5.
17
EECE 285 VLSI Design
The first to add is the nmost transistor. To select this transistor, select NCSU_Analog_Parts
then select the category N_Transistors and select the nmos4 transistor from the list. In the
Add Instance window enter the width as 4u and the length as 2u. Cadence will automatically
change this to 4u M and 2u M respectively. Move the cursor into the editing window. Notice
that there is an nmos transistor there instead of the normal cursor. To place the component, you
need to left click. To rotate the component you need to right click. To exit from adding the
current component or any other action press the Esc key. Notice that there are letters next to
many of the choices in the menus, these are hot keys and can make you work progress a lot
faster if they are learned. Place the nmos transistor in the bottom half of the screen on the right
side of the center line.
Next, we will add a pmos transistor. This is located under the library NCSU_Analog_Parts-
>P_Transistors and select the pmos4. Give it the same width and length and place it on the top
half of the screen above the nmos transistor.
The next step is to add the pins. Click Add->Pin and a window appears for adding pins to the
schematic. We will add pins vdd, vss, in, and out. Ensure that the direction is set to
inputOutput, Figure 6.
18
EECE 285 VLSI Design
The order in which the pins are added does not matter. You can also add only one pin at a time.
In the current method, the pins will be placed in the order they appear in the list. First, place the
vdd pin above the pmos transistor. Note the small diamond that is the actual pin so rotate the
object until the diamond faces down toward the pmos transistor. Add the vss below the nmos,
the in to the left of the screen, and the out to the right of the screen. In all cases make sure the
small diamond faces the transistors.
Now we will add wires to connect the entire Inverter so it will work. Click Add->Wire to add
wire or you can use the hot key 'w'. Refer to Figure 7 below to see how the connections are
made. Notice that as you get closer to a device or node when placing wire, a small diamond
appears. This is where you need to click to place a wire. If you make a mistake click on the
error and select Edit->Delete.
Once you have completed adding all components and wire, Figure 7, click the "check mark"
icon on the left of the window. This will check your work for errors and save your work to the
library. The same can be done with Design->Check and Save. Any errors will be reported in
the CIW.
19
EECE 285 VLSI Design
4) When the schematic is finished you can print it out. To do this click Design->Plot-
>Submit. The window that appears allows you to select the options for printing, Figure 8.
You can print directly from here, or if desired, the schematic can be saved as a file, such as
a PostScript. To save to a file click Plot Options on the bottom of the window. In the new
window, select Send Plot Only to File and enter the desired file name, such as plot.ps.
20
EECE 285 VLSI Design
21
EECE 285 VLSI Design
Building a symbol
1) This part of the tutorial deals with the layout of the symbolic representation of a circuit, in
this case an inverter. As with the schematic, we will create a new cell view for the symbol.
You can make the new cell view though any of the methods we have previously discussed.
We will also name this view inv, but it will be a symbol rather than a schematic, Figure 9.
Make sure symbol is the View Name and Composer-Symbol is the Tool. Press OK to continue
and a familiar window will appear in which you will draw the symbol, Figure 10.
22
EECE 285 VLSI Design
First, we need to draw a triangle on its side to represent the body of the inverter. Draw a
vertical line on the left of the center line and connect the ends at a point on the right of center.
To access the tools needed to draw the shapes click Add->Shape->Polygon. Figure 11 shows
this window and other required settings.
23
EECE 285 VLSI Design
After adding the triangle, we need to add a circle at the right point to indicate negation. Click
Add->Shape->Circle and then on the diagram click where you want the center of the circle,
move the mouse until the circle is the size you want, and click again to stop sizing the circle.
Next we need to add the pins to our inverter. As before, click Add->Pin to bring up the Add
Pin Window. We will again create pins vdd, vss, in, and out. As in the schematic make sure
the pins are specified as inputOutput. The Add Pin Window can be seen in figure 12 below.
Now we need to place the pins. This is done in the same manner as in the schematic, but these
pins are represented differently. On these pins, one end of the line has a small box. This box is
the actual pin. Place this box away from the symbol. The shortcut of right click to rotate will
save a great bit of time here. Because the pin names may be hard to read now, you can move
them by clicking Edit->Move or using the shortcut 'm'.
Now we want to label the symbol. We will add two labels here. Begin by clicking Add-
>Label, which will invoke the Add Label box, Figure 13.
The first label is going to be the instance label. This is the default label as seen above. Place
this label near the symbol of the inverter. The second label will be the name label. If the Add
Label box disappeared after adding the instance label, bring it back up. Change label type to
normalLabel and type the name of the device in the Label field, Figure 14. Place this label on
or near the symbol. When we place the symbol in schematics, all of the symbols will have the
same name, but different instances, e.g. U1, U2, etc.
24
EECE 285 VLSI Design
The last task is to add the selection box to the symbol. Click Add->Selection Box and click on
the choice of Automatic on the window that appears.
The symbol is now finished and should look similar to the symbol below in Figure 15. If you
are satisfied with the symbol, save it by clicking Design->Save.
25
EECE 285 VLSI Design
26
EECE 285 VLSI Design
In the new schematic, we need to add the inverter, two DC voltage supplies, a ground
connection, and a capacitor. First we will add the inverter. Click Add->Instance, change the
library to your library, and select inv. Place it in the center of the schematic. Next we will add
the two voltage supplies. The first we will add is the input supply. Click Add->Instance,
change to NCSU_Analog_Parts, click Voltage Supplies, and select vdc, Figure 14. Place the
first supply to the left of the in pin on the inverter. You may want to rotate the supply so that it
is horizontal with the positive terminal closest to the in pin. Before placing the next supply (the
vdd supply) we need to change a parameter for the supply. In the Add Instance window, set the
DC Voltage to 5 V. Place the supply at the top of the schematic.
Next we need to add the ground connection below the vss pin of the inverter. This is found
under Supply_Nets in NCSU_Analog_Parts. We also need to add a capacitor at the output of
the inverter to act as a load. This is found under Parasitic_Devices in NCSU_Analog_Lib.
When all of the components are placed, we need to add a pin at the output of the circuit. Add a
pin called out. This pin should be an INPUToutput pin as have all of the previous pins. The
finished circuit should look similar to the one below:
27
EECE 285 VLSI Design
2) We are now ready to simulate this schematic. Click Tools->Analog Environment to open
the window that gives access to the simulation tools, Figure 16.
28
EECE 285 VLSI Design
Make sure the simulator is set to spectreS. Go to the tab, Setup, and select
Simulator/Directory/Host In this window make sure that simulator is set to specterS.
Now we need to specify what we want to do with our simulation. We first need to specify our
analysis, click Analyses->Choose. In the window that appears, select dc and click
Component Parameter. Next double click Select Component, so that you can select the
input DC voltage source on the schematic, Figure 18. This will bring up another window in
which you need to select the parameter of the source that will be used in the analysis. Select
dc.
29
EECE 285 VLSI Design
Next enter the starting and stopping voltages for the supply (Start: 0V, Stop: 5V). Select linear
for Sweep Type and make the Step Size 0.1. The Analysis window should appear similar to
the one below:
30
EECE 285 VLSI Design
Click Ok to close the window. The next step is to select the outputs. Click Outputs->To Be
Plotted->Select On Schematic. This will bring the schematic window to the front. Select the
nodes at the input and output of the inverter, Figure 20.
31
EECE 285 VLSI Design
Figure 20: Test Schematic with input and output nodes selected
This is done by clicking them once. Minimize the schematic and return to the Analog
Environment window. This window should now look like the one below, Figure 21.
32
EECE 285 VLSI Design
Finally, we are ready to run our simulation. Click Simulation->Netlist and Run. This will
run the simulation and should produce an output file and a plot of the inverter's input and
output, Figure 22.
33
EECE 285 VLSI Design
34
EECE 285 VLSI Design
1.4) Go to the tab labeled Tool, and then Design Synthesis and select Layout XL.
1.5) This will open the Setup Options window. Select create new and click OK.
36
EECE 285 VLSI Design
1.6) In the create new file window, fill in the cell name, make sure Virtuoso is selected for the Tool
and then click OK. This will bring up the XL layout editor window and the LSW window.
37
EECE 285 VLSI Design
38
EECE 285 VLSI Design
39
EECE 285 VLSI Design
40
EECE 285 VLSI Design
41
EECE 285 VLSI Design
2.2) Go to the tab, Options, and select Display. This will allow you to select what is being
displayed on the layout screen. To see the different levels inside the transistor change the
display level stop to 32.
42
EECE 285 VLSI Design
3.3) To connect the components together go to the LSW window and select the intended layer
and select the rectangle tool from the left side bar in the LX layout editor window. Connect the
nmos and pmos gates with poly and the pins with metal1. To connect the input pin to the poly
you will need the poly to metal 1 via.
43
EECE 285 VLSI Design
3.4) Make sure to keep your cells the same height so that they will be easy to connect to each
other.
44
EECE 285 VLSI Design
45
EECE 285 VLSI Design
4.2) The results of the DRC can be viewed in the icfb log window. It will list the
number of errors as well as the rule that was violated.
4.3) One of the DRC errors that you might encounter is an off the grid error. This happens
when wire nets or symbols are not on the same grid. There is a default grid setting, but it can
be changed. It is under the display options. It is a good idea to keep them on the default
settings. This can also occur if you use symbol created on a different grid setting. For example
if you create an inverter symbol instance on a grid with minimum of 0.3 you can draw the
inverter symbol such that it is 2.4 X 3.6 in size. However, if your grid is set at 0.5, then errors
will occur during the DRC check. A 0.5 setting could handle 2.5 X 3.5. In other words, if you
46
EECE 285 VLSI Design
use a W and L that is not a multiple of the minimum grid setting you will get an off the grid
error.
47
EECE 285 VLSI Design
6.3) When the LVS is complete a window will appear that will let you know if the layout and
schematic matched. The result of LVS can also be seen in the icfb window.
48
EECE 285 VLSI Design
49