Tutorial 1
Tutorial 1
An important concept is that the Cadence tools only provide a framework for doing
design. Without a foundry-provided design kit, no design can be done. The design rules
used by Cadence set up in this class is based for AMIs C5N process (0.5 micron 3 metal
2 poly process).
So, how is Cadence set up?
Broadly, there are three sets of files that need to be in place in order to use Cadence.
1) The Cadence tools
These are the design tools provided by the Cadence company. These tools are
located in the /home/cadence directory. They are capable of VLSI integration,
project management, circuit simulation, design rule verification, and many other
things (most of which we won't use).
2) The foundry-based design kit
As mentioned before, the Cadence tools have to be supported by a foundry-based
design kit. In this class, we use Cadence design kit developed by the North
Carolina State University (NCSU CDK). NCSU CDK provides an environment
that has been customized with several technology files and a fair amount of
custom SKILL code. These files contain information useful for analog/fullcustom digital CMOS IC design via the MOSIS IC fabrication service
(http://www.mosis.org). This information includes layer definitions (e.g. colors,
patterns, etc.), parasitic capacitances, layout cells, SPICE simulation parameters,
Diva rules for Design Rule Check (DRC), extraction, and Layout Versus
Schematic (LVS) verification, with various GUI enhancements.
For more information on the capability of the NCSU CDK, go to
http://www.eda.ncsu.edu/wiki/NCSU_CDK
Setting up Cadence
Note: People who have already set up Cadence before still need to follow the steps
below.
Before you start using cadence you need to complete the following steps:
1. First, before anything else, make a directory from which to run Cadence. This is
important so that all of Cadences files end up in a consistent location. I
recommend making an IC_CAD directory and then under that making a cadence
directory:
cd
mkdir IC_CAD
mkdir IC_CAD/cadence
2. You need to add the following lines in your .tcshrc file (or whatever shell setup
file you use) Just open it up with emacs and add to your search path:
/uusoc/facility/cad_common/local/bin/F09
For example, your .tcshrc file may look something like this after adding the line
above:
The first two lines set your working directory for cadence as IC_CAD/cadence.
The third line sets up the path to a directory that contains class-specific settings.
After you save this file you can log out and log in again, or you can source it from
the command prompt in the following way.
:~> source .tcshrc
The sourcing only needs to be done the first time. After that the .tcshrc file will be
sourced automatically when you log in and start up a shell.
2. Library Manager will automatically be opened. If not, in the CIW, select Tools
Library Manager. You should get the following window, with the following list of
libraries:
3. In order to build your own schematics, youll need to define your own library to keep
your own circuits in. To create a new working library in the library manager, select File
New Library. In the Create Library window that appears fill in the Name field as
ECE5720 (or whatever youd like to call your library). Select Attach to existing tech
library for Technology Library. Select UofU AMI 0.6u C5N (3M, 2P, high-res)
process and press OK. Path field is left blank.
the CIW menu. The Create New File window appears. The Library Name
field is ECE5720. Fill in the Cell Name field as RC_filter. Choose
Composer - Schematic from the Tool list and the view name is automatically
filled as Schematic. The library path file is automatically set. Click OK.
Now, enter the capacitance value of 1u F and hit Hide. Place the capacitor in the
schematic window.
Other instances can be added in the similar fashion as above. Resistors can be found
in R_L_C res. Enter the required resistor value.
To come out of the instance command mode, press Esc. (This is a good command to
know about in general. Whenever you want to exit an editing mode that youre in, use
Esc. I sometimes just hit a bunch of Escs whenever Im not doing something else
just to make sure Im not still in a strange mode from the last command. )
5. Connecting Instances with Wires
To connect the different instances with wires we select Add Wire (narrow) or
press w to activate the wire command. Now go to the node of the instance and
left-click on it to draw the wire and left-click on another node to make the
connection. If you need to end the wire at any point other than a node (i.e. to add
a pin later on), double left-click at that point. To come out of the wire command
8. Using all the commands given above the schematic of a RC_filter can be
constructed as shown below.
10
1. In the Virtuoso schematic window of the schematic you have created above,
select Design Create Cell View From Cell View. A Cell View from
Cell View window appears, press OK.
11
1. The input voltage source for transient simulation will be vpulse (taken from
NCSU_Analog_parts library, menu: Voltage_Sources) with the following
specifications: this source will generate pulses from 0V to 5V with the given
12
pulse width and period. Notice that we assign it a finite rise and fall time which
means that the change from 0V to 5V (or back) isnt instant, it takes some time.
This is a better model for the analog behavior of the circuit than a pure square
wave.
Voltage 1
Voltage 2
Delay time
Rise time
Fall time
Pulse Width
Period
0v
5v
0u s
2u s
2u s
5m s
10m s
2. The input voltage source for AC simulation will be vsin (taken from
NCSU_Analog_parts library, menu: Voltage_Sources) with the AC magnitude
set to 1 V.
3. The input voltage source for DC simulation will be vdc (taken from
NCSU_Analog_parts library, menu: Voltage_Sources). No other specifications
need to be entered, as we will be sweeping this voltage value.
4. The ground connection to be selected is gnd (found at NCSU_Analog_parts
library, menu: Supply_Nets). Note there are a many types of ground connections
in the sub-menu. Make sure you only select gnd.
5. Connect all the symbols with wires. Add the output pin Out as well as label the
input and output wires (Add Wire Name or press l and place the label on the
wire)
6. i If there are no errors found, your schematic is ready for Spectre Simulation.
Simulation Using Analog Environment
In the Schematic Editor, select Tools Analog Environment. In the Virtuoso Analog
Design Environment Simulation Window that appears, there are many kinds of
simulators and analysis methods. We have set the default to SpectreS simulation and
also have set the corresponding model paths and scaling factor. All you need to do in this
window is to select the type of analysis you need and then select the nodes at which you
want to observe the waveforms. You are encouraged to play around with the various
menus and figure out how they make can your analysis easy and interesting.
13
14
The nodes to be plotted directly after simulation can now be chosen by selecting Outputs
To Be Plotted Select on Schematic.
Select the wires to be plotted (in this case the In and Out voltages of the RC filter), by
clicking on them in the schematic window. When you click on a wire (the blue line), the
voltage is chosen to be plotted, and the wire changes color. To plot currents, you will
need to click on the corresponding terminal of an instance and there will be a colored
circle around that terminal to indicate a current marker.
There are two formats of waveforms to choose from. The default setting will not produce
plots that look like those in the tutorials. If you would like to make the plots look like
those in the tutorials, in the Virtuoso Analog Design Environment, select Session
Options and change the Waveform Tool from WaveScan to AWD, then click OK. Either
plotting format is acceptable, however, AWD format lacks measurement tools that are
found in the WaveScan format.
Now choose Simulation Run or hit the green traffic lights on the right hand side of
the window. The simulation starts. Wait for the simulation to complete. A Waveform
Window containing 2 curves on top of each other will be now displayed. To get a better
view of the simulated result, press the switch axis mode-button
side of the waveform window.
The following Waveform Window showing the input and output of the RC filter is now
displayed:
15
Take a moment to explore the features available in the Waveform Window. Use the
zoom option (by typing z), and magnify an edge. Measure the time between two points
using the A and B markers.
For DC sweep of the input:
You may first want to delete or disable your previous analysis. This can be done by
selecting the analysis that you want to disable/delete and then looking for options under
Analyses. You may also disable/delete the IN waveform from being plotted for the ac
and dc analyses.
Now, choose dc under the Analyses menu. Select Component Parameter as the sweep
variable. Click on the Select Component button and the RC_filter schematic is
opened in order to select the sweep variable (You may have to click it twice before the
schematic shows up. If you are unable to see the circuit in the schematic editor then
select the schematic window and press f). Select the vdc voltage source. This activates
another window as shown below. Select the DC voltage option.
16
Now, again select the Analyses menu. It should look like this:
17
Enter the sweep range (0 V to 5 V) and sweep type (Linear with step size 0.1 V) as
shown above. Run the simulation.
18
19
20
7. In the Waveform Window, select Curves > Edit (select /Out and delete it).
8. Now in the Design Environment Window, select Tools > Calculator > vf
(this would open the schematic window).
9. In the schematic, select Out.
10. In the Calculator Window you should get VF(/Out).
11. Next select dB20.
12. In the Calculator Window you should get dB20(VF(/Out)).
13. Now select plot. You should get a DB plot similar to the one shown below.
14. Add the phase by doing Tools > Calculator > vf (this would open the
schematic window).
15. In the schematic, select Out.
16. In the Calculator Window you should get VF(/Out).
17. Next, select phase.
18. In the Calculator Window you should get phase(VF(/Out)).
19. Now select plot. You should get a phase plot similar to the one shown below.
21
22