Set-Up for Cadence from Home and Getting Started

(This is the version for Spring 2022. If you access this later, the information might be outdated!)

In this course's lab tasks you’ll use a professional ASIC layout tool to conduct simulations of circuits with a high level of detail, much more detail than the simple models used in the course book. The program runs under Linux and it will be set up to simulate circuits implemented in a 65nm CMOS technology.

Important: please always close Cadence if you are not using it and before logging out! We do have only a limited number of licences and if you leave Cadence running the licence might not be returned to the licence server correctly for someone else to use.

1) Working from home

To use Cadence you’ll have to log in onto a RedHat 7 Linux server at IFI via the cluster name rh7login.ifi.uio.no. That can be done from home or from a machine at UiO.

NOTE: Many of the machines that you can use are Red Hat Linux 8 (RH8) machines. login.ifi.uio.no is a collection of RH8 servers for instance, while Cadence runs only on RH7 for now.

For Windows:

In short: you should use VMvare to interface to a Linux workstation by the name 'ifi workstation'. From there you'll follow the instructions for Linux and Mac to get to the rh7login.ifi.uio.no cluster.

In a web browser go to https://view.uio.no . There you'll get the option of either running VMware in your web browser, or (recommended) install the VMware client on your Windows machine. For the latter you find a link in the lower part of the page. If you install and start the client, there is an icon for view.uio.no that you select. Then (either in the browser version or the client) you log in with your UiO credentials. Then you get a whole selection of icons to either access different servers or to run some applications. One of the servers is the Linux server 'IFI workstation'. Select it with a double click! A full screen session on that Linux server will open. You can change that into a smaller window if you like. On the top tool bar on the left choose 'Activities' and open a 'terminal' (the black command window icon on the vertical tool bar that drops down). Then follow the instructions for Linux machines below.

For Linux and MacOS:

For MacOS tehre is also a VMware client, so you may just follow the instructions for windows above. However, in both Linux and MacOS you can use a more direct method as well and run ssh from a command line window. On the Mac you also need to install a X11 server if you do not have one. This is very easy and free, just download and install from XQuartz.org and then install the latest version that supports your version of macOS.

use the command:

>ssh -Y rh7login.ifi.uio.no

If you sign on from a system where your username is not your UiO user name add an additional parameter to the command:

>ssh -Yl <UiOusername> rh7login.ifi.uio.no

Once you are logged in on rh7login.ifi.uio.no you need to make sure to run a BA-shell, so execute the command:

> bash

2 ) Cadence, “Schematics Editor” and “Analog Design Environment” (ADE) simulation tool

In order to use Cadence you’ll have to make a working directory, named for example “tsmc65nm”. Follow the instructions on

https://nano.wiki.ifi.uio.no/Startup_TSMC65nmLPRF_OA_Cadence617

to set up and start Cadence.

Library manager

In the main window (icfb window) choose “tools->library manager” and the library manager will pop up. In the left hand side column you’ll see a list of libraries. In the editable field on top of that list, enter a new library name for your working library in which you will create your cell containing the schematic to simulate. Compose the name of your initials first followedby the technology identifier “TSMC65” and then a name of your choice,all seperated by underscores, so in case of the lecturer the library is called “PH_TSMC65_IN3170”. (This naming convention is not terribly important for this exercise, but should you start a master project with NANO and collaborate on a layout where different people share their libraries this will be convenient.) After having written the name, hit “return”. You will first be asked to confirm the name. Hit “ok”. Then there will be a pop-up asking for a “technology file”. Tick off “attach to an existing techfile” andhit “ok”. In the next pop-up select the file “cdsDefTechLib” and hit “ok”.

Schematics editor

In the second column in the library manager you’ll see “cells” defined for the library that is selected on the left. Select your new library on the left! In the case of your new library, there are no cells yet. Create one by writing a name in the editable field on top of the second column,e.g. “lab1”, and hit “return”. A pop-up will ask you for a view name, which should be “schematic” and a tool which should be “Schematic L”. If that is set correctly hit “ok”. (Cells can have different views, typically a “schematic” that describes the cell on that level, and a “layout” containing the layout that corresponds to that schematic, and also a “symbol” that you can use hierarchically in other schematics to represent this circuit with a simple symbol, but this need not concern you here and now.)

Now a blank schematic editor will pop-up, to which you can add a number of circuit “instances” that you’ll need to run your simulation. Select “Create->instance...” from the top tool-bar. A pop-up will ask you which instance of a cell and cell view to add. Usually you will only instantiate “symbol” cell views into a schematic. The cells you are going to use for the exercises are to be found in two libraries: “analogLib” and “tsmcN65”. “tsmcN65” contains the transistors, cell names “nch” and “pch”. “analogLib” contains the symbols for the global power nodes“vdd”, and “gnd”, as well as a dc voltage source (“vdc”) and an a bit more dynamic voltage signal source (“vpulse” that allows you to provide pulsesand ramps) for simulation purposes (corresponding current sources are“idc” and “ipulse”). With these elements, you can now draw the circuit you want to simulate.

If you select a component in your schematics and hit the key “Q” you’ll get a list of parameters for this instance of a cell. In this pop-up window you can for instance set W and L of transistors, set the “DC voltage” for “vdc” and define the behaviour of the output of “vpulse”. For the parameters, instead of numbers, you can also write in a variable name. These variables can then be used in the simulation tool "ADE L" to set these parameter values at simulation time, instead of in the design itself. Some simulation options will also allow you to sweep those variables instead of just giving them a constant value.

Note that “vdd” is but a global electrical node and not a power supply by itself: you will always have to place a “vdc” between an instance of “vdd” and “gnd” and set its “DC voltage” to 1.2V (for this65nm technology) for the simulation to run correctly. Only then will all nodes connected to the Vdd symbol be powered by that "vdc"

You can draw connections by selecting “Create -> Narrow Wire” from the top tool bar. You can name wires/electrical nodes by selecting “Create -> Wire Name” from the tool bar. Naming wires is quite useful to identify electrical nodes easily in the simulation output.

ADE L simulation tool

To run a simulation choose “launch->ADE L” from the drop-down menubar of the schematics editor. A new pop-up window will allow you to define simulation parameters and run a simulation. In its drop-down menu barselect “outputs->to be plotted->Select on schematic”, and select the nodes that you want to see the voltages or currents of. By clicking on a cable you’ll select a voltage to be displayed, by clicking on a pin of a component you’ll select the current coming out of that node. Click “choose analyses” in the right hand tool bar, and then select “tran” in the pop-up. Set the stop time to an appropriate value: this will depend on how you setup your signal sources for the simulation (e.g. “vpulse”). Always select “Design->Check and Save (X)” in the schematics editor before finally running a simulation. If you have edited your schematics and have not saved it, the simulation will fail to run. To run the simulation select “run” in the “analog environment” right hand tool bar (the green play button).

Types of simulation

As you click “choose analyses” in the right hand tool bar of the ADE L tool, you get several choices for simulations to set up:

a) dc

Makes a DC analysis where you typically sweep one variable, such as a gate voltage of a transistor or the circuit temperature, and produce a plot of all outputs. For circuit parameters you can use variables that you have defined for one of your components, e.g. a voltage of a "vdc" or also a "vpulse" or "vsine" source: here only the parameter "DC voltage/current" is used, and the respective waveform you have defined is ignored (it is only used for "trans" simulations). Then you define a range for the parameter you want to sweep.

b) ac

Here the simulation will do a small signal analysis and produce a frequency plot, analyseing the filter properties of your circuit. You define a frequency range, and the simulation uses the parameters "ac magnitude" for the components that provide input to your circuit and "DC voltage/current" for all sources to set the point of operation. Again, the specific waveforms from sources such as "ipulse" or "vsine" are ignored. The value of "ac magnitude" is typically 1 if you have but a single source of input. The magnitude plot is then the result of a small signal analysis and the vlues given relative to that input value. If you have multiple inputs with relative input amplitudes you can use values other than one.

Bode plots including the phase plot can be obtained by clicking on "Results->Direct Plot->Main Form ..." in the ADE L tool. Then you can select what you want to plot, e.g. "ac" and "dB20" or "phase" and click on the node you want plotted in the schematic.

c) trans

Here now the waveforms of your input sources do matter. You can simulate things like a step response or a digital counter.

3) MATLAB:

We will be using MATLAB (also available for UiO students for installation at home from https://www.winprog.uio.no/ for Windows and https://www.macprog.uio.no for Mac) for some excersises and it’s the best tool for plotting all of your results as nice graphs.Thus, you should bring a working knowledge of MATLAB to this course. Ifyou have none, get a crash course from a fellow student who has used it! Itis a powerful mathematics tool with a command line interface. One usefulfunction is ‘help’. ‘help <commandname>’ will display an explanationon how to use ‘<commandname>’. Another help function that helps you find functions that you do not know the exact name of is ‘lookfor’. Type‘help lookfor’ to learn more.

There are several ways to export data from the simulation results to MATLAB. One is to copy the following command into the main (icfb) window:

ocnPrint(v("/out" ?result 'tran) ?numberNotation 'none ?output "out.m" )

This will create a file “out.m” in your cadence working directory containing the voltage of node “out” of your simulation as a two column matrix where the first column is the time and the second is the voltage. To actually load this into MATLAB you’ll have to import it using a little parser function i wrote called readCadenceOcnPrint.m that you can download here clicking on it. It needs to be in the directory where you run Matlab and in Matlab you can write the command:

m = readCadenceOcnPrint( "out.m" )

and the the matrix m will contain the result where the first column is the time and the second the voltage/current value.

 

By Philipp H?fliger
Published Jan. 4, 2022 10:20 AM - Last modified Apr. 4, 2022 1:24 PM