Cadence Setup and Tutorials (2)
Cadence Setup and Tutorials (2)
In this lab, you will learn to use Cadence software to design analog circuits. Cadence is installed in the vlsi
systems (vlsi3 through vlsi11). To set up cadence, follow the instructions listed below. This is the initial
setup that you need to do only once.
Setting Up Cadence
Log in to server:
1. Download VNC Viewer, install and log into one of the vlsi (vlsi3 through vlsi11) servers. You will get
the download link, instructions for login here ( https://help.eecs.utk.edu/knowledge-base/general/remote-
access/vnc ).
Note: To connect to the server from your personal PC (not connected to UTK network), you have to use
Pulse Secure VPN. Use this link (https://utk.teamdynamix.com/TDClient/2277/OIT-
Portal/KB/ArticleDet?ID=122938) to know how to connect to the VPN.
Creating the work area and setting it up.
After successful login, open the terminal (to open the terminal, right click on the previous window and
select the ‘Open in terminal’ option.). Now, type in the terminal:
mkdir my_directory (you can use any name instead of my_directory)
cd my_directory
mkdir Cadence
cd Cadence
cp /home/ece433/cadence_lab/setup_files/* ./
cp /home/ece433/cadence_lab/setup_files/.cdsinit ./
If you type
ls -a
you should see these files:
The following needs to be done every time you want to run cadence:
Once you open your terminal, you need to
cd my_directory
cd Cadence
tcsh
source source_file
virtuoso &
The first window that appears is called the CIW (Command Interpreter Window).
Another window that is very handy is the Library Manager, which allows you to browse the available
libraries and create your own. To display this window, choose Tools -> Library Manager... from the CIW
Menu.
In the Library Manager, create new library called “ADETutorial”. Select File->New->Library. This will open
new dialog window, in which you need to enter the name and directory for your library. By default, the library
will be created in the current directory. After you fill out the form, it should look something like this:
Click OK. Next, you will see a window asking you what technology you would like to attach to this library.
Select "Attach to an existing technology library" and click OK. In the next window, select
"NCSU_TechLib_FreePDK45".
You should see the library "ADETutorial" appear in the Library Manager.
Schematics
Next, select the library you just created in the Library Manager and select File->New->Cell View.... We will
create a schematic view of an inverter cell. Simply type in "myInverter" under cell-name and "schematic"
under view. Click OK or hit "Enter". Note that the "Application" is automatically set to "Schematics L", the
schematic editor.
Alternatively, you can select the "Schematics L" tool, instead of typing out the view name. This will
automatically set the view name to "schematic". Click Ok. You may see the following window. Simply click
Ok to ignore this warning.
After you hit "OK", the blank Composer screen will appear. You can now draw schematics using the buttons
on the toolbar above the black screen.
Schematic Generation:
You will first need to generate a schematic of your circuit. Press “I” and a library browser will pop up.
Generate the schematic as shown below. Most components will be in the “analogLib” and
“NCSU_Devices_FreePDK45” libraries. See the screenshots below to help guide you along the schematic
generation process. Drawing wires can be done with “W” shortcut and selecting a component and hitting “Q”
will bring up the property menu, where all parameters of the element can be changed. Also note that the
minimum length of the transistors is 50nm! Do not make your transistors 45nm as they will fail the design
rules during layout.
Once you have the complete schematic with all the values you are ready to simulate your circuit.
Simulating the Circuit:
From the Schematic Window menu, select Launch -> ADE L. You may get another message saying that the
license need to be upgraded. Simply click YES to proceed. A window will pop-up. This window is the Analog
Design Environment Window.
Choose a Simulator.
From the Analog Artist menu, select Setup -> Simulator/Directory/Host. Enter the fields as shown below.
Choose spectre as your simulator. Your simulation will run in the specified Project Directory. You may
choose any valid pathname where to dump simulation results.
Next you will need to select the CMOS models and include them in the design environment. From the menu
select Setup -> Model Libraries. From there you will need to include the models.
The path of the model libraries is
/home/ece433/cadence_lab/pdk_ece433/FreePDK45/ncsu_basekit/models/hspice/tran_models/models_nom
Include all the files in this directory.
Below are the screenshots showing what the outcome of adding all the right models is (Ignore the path in the
figure below). There are 4 transistor types. VLT is a low threshold device, VTG is a regular threshold device,
and VTH is a high threshold device. The low threshold voltage transistors are faster but have higher leakage.
The last flavor is a THKOX or thick oxide device.
Once the models and the simulation directories are setup you will need to select the simulation types you want
to run. From the menu again select Analyses->Choose.
Below is a capture for the transient simulation.
You will also need to run a DC simulation in order to observe static characteristics of the inverter. From the
menu copy the design variable that was defined in the input pulse source. Variables -> Copy From Cellview.
Next go to Analyses->Choose and select a DC simulation. The screenshot below shows what the end result
should look like.
The last thing you want to do is plot the signals automatically. From the menu go to Outputs->To be Plotted
which will let you select the signals of interest. Select the input and output of the inverter and hit ESC. You
are now ready to run the simulation. Press the Green Play Butoon in the ADE-L GUI and the simulation
should run. If everything went well the output will be as follows. You can now measure the delays of the
inverter as well as its trip point.
Figure 1 and 2
Click Ok. You may see a warning about upgrading the license. Simply click Ok to ignore this warning. After
you hit "OK", the Virtuoso screen will appear as shown below. In addition, the LSW window (Layer Selection
Window), which shows various mask layers, will automatically pop up.
Figure 3
4. Laying out an Inverter
Some tips before you start:
You may notice that you might not be able to view all the hierarchy in the layout. To fix this hit E in the
layout window to get the Display Editor and set the maximum display level to 32 (from 0).
Another thing that you might want to do is turn off the gravity. Gravity will basically bring your cursor to the
closest edge which can be annoying at times. To turn the gravity off hit Shift-E in the layout window and
uncheck the Gravity On box.
NOTE: The NMOS and PMOS layout models (pcells) don’t work so you will need to draw all the
transistor layouts yourself!
instead of pwell and nimplant. Note also the letters "drw", "net", and "pin" next to each entry in the LSW.
These are the purposes of a shape. The purpose is used to indicate special functionality of a shape.
5. DRC
To perform a Design Rule Check (DRC), choose Calibre->Run DRC…. The DRC form appears, as shown
below. Go to the Rules tab, and change the DRC Rules File to
/home/ece433/cadence_lab/pdk_ece433/FreePDK45/ncsu_basekit/techfile/calibre/calibreDRC.rul
to point at the calibre rules file.. Now, load the calibreDRC.rul file. Then click "Run DRC".
Keep modifying your layout until there are no errors. You will know that there are no errors when there are
no red boxes in the RVE. Alternatively, you can look in the file inv.drc.summary. When the layout is "DRC
Clean", the last line of this file should read "TOTAL DRC Results Generated: 0".
Lastly, we need to create pins so that the nodes in our layout have names that are human-readable. Create
these pins by selecting Create->Pin…. You should see a dialog box appear, like the one below. Type the
names vdd!, gnd!, in, and out in the “Terminal Names” text-box as shown below. Select “Display Pin Name”.
Leave all other options as they are.
6. LVS
LVS checks your layout against your schematic. To perform a layout-vs.-schematic (LVS), choose
Calibre -> Run LVS.... The LVS form appears, as shown below.
7. Extraction
The layout is just a picture. If you need to run simulation using the layout, you should convert it to the other
format. It is done by extracting. It’s something like compiling a code.
Create “extracted” view
In your library, open the layout view of the cell “Inv”. On the layout window click Verify -> Extract, and
then click OK. You can find the created extracted file in the library manager next to the other cell views of
Inverter as it is shown in Figure 15.
Double click on extracted to open it. The extracted view should look like Figure 16.
1. The post layout simulation is very similar to the schematic simulation. You need to open the schematic
view of the “Inv” and follow all the steps of the schematic simulation. Or, you may have saved previous
state, Session a Load state, usually the default the last state you saved. If you didn’t save, you may have
to follow above set up steps. The only difference is that you need to click Setup -> Environment and
type “extracted” before the word schematic in the switch view list.
2. That is, you first have to select “spectre” as your simulator, add the model libraries and then use the
extracted file for your simulation from Environment setting. You also need to choose the transient analysis
and select the outputs to be plotted on schematic to run the simulation. Remember that if you do not select
spectre simulation, you cannot change the environment settings, or add model libraries.
3. Click Run and see the simulation results.