cadence tutorial

40
Cadence Tutorial EEE433/591 Analog Integrated Circuits Spring 2005 Cadence ICFB (IC Front to Back environment) is a software package used for Integrated Circuit design and simulation. This software features a complete suite of tools including schematic capture, simulation, layout, and extraction. Several simulation engines are available: spice, hspice, spectre, etc. These engines require model files that specify the device modeling parameters, such as oxide thickness (Tox) and electron mobility (Uo). 1. We will be using the TSMC 0.3u process available in the NCSU Design Kit. 2. We will also be using spectre for simulation. The following tutorial will guide you through the basic setup and operation of Cadence ICFB. You will build a schematic and perform several analyses. 1

Upload: fatman480415

Post on 24-Nov-2014

179 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Cadence Tutorial

Cadence Tutorial

EEE433/591 Analog Integrated Circuits

Spring 2005 Cadence ICFB (IC Front to Back environment) is a software package used for Integrated Circuit design and simulation. This software features a complete suite of tools including schematic capture, simulation, layout, and extraction. Several simulation engines are available: spice, hspice, spectre, etc. These engines require model files that specify the device modeling parameters, such as oxide thickness (Tox) and electron mobility (Uo).

1. We will be using the TSMC 0.3u process available in the NCSU Design Kit.

2. We will also be using spectre for simulation. The following tutorial will guide you through the basic setup and operation of Cadence ICFB. You will build a schematic and perform several analyses.

1

Page 2: Cadence Tutorial

Quick Tips

I. Should the Schematic not display correct, select Window -> Redraw from the Schematic menu

II. Schematic view has many editing operations that are very helpful. For example copy, paste, undo, rotate.

III. These operations are accessible through any of the following: the Edit menu, the side bar buttons, and shortcut keys.

IV. IMPORTANT: Hit the “Esc” key to exit an operation.

2

Page 3: Cadence Tutorial

Contents:

1. Cadence Startup 4 2. Startup Screens 5 3. Create A New Library 7 4. Create A New Schematic 8 5. Adding Components to the Schematic 10 6. Connecting Components in the Schematic 14 7. Simulator Setup 16 8. DC Analysis 18 9. Transient Analysis 20 10. AC Analysis 23 11. Parametric Analysis 26 12. Saving State of the Analog Design Environment 28 13. Plotting VI Characteristics 29 14. Plotting DC Transfer Characteristics 34 15. Plotting Rin and Rout 36

3

Page 4: Cadence Tutorial

1. Cadence Startup:

a. Cadence is started from a terminal on the desktop and select

b. Runninust be copied to your home

ing

source /usr/local/cadence/NCSU/setup_files/setup_cadence

iii. g: icfb&

. Starting Cadence after the 1st time

“cadence”

% cd cadence

. Execute icfb:

% icfb&

i. To open a terminal: right click“new Terminal”. Or, press “Ctrl”+”t” on the keyboard g Cadence for the 1st time

i. Several configuration files mdirectory. This process is automated by running the followcommand:

%

ii. You will notice that a directory “cadence” was created and several files were copied into it. To start Cadence type the followin

%

ci. Open a new terminal. ii. Changes directories to

iii

4

Page 5: Cadence Tutorial

2. Startup Screens:

hen ICFB starts, two windows appear: the ICBF Log window (Figure 1) and the

WLibrary Manager (Figure 2). The Log window is the main window for ICFB. User preferences and other options are accessed through its menus. The Log windowalso displays useful output, such as if a simulation run completes successfully or unsuccessfully.

Figure 1. The ICFB Log Window

he Library Manager provides organization for components and design files.

cts TCadence files are organized into “Libraries.” Cadence files are structured objecalled “Cells”. Each “Cell” can have several different “Views”. These “Views” are associated with a particular Cadence tool, such as the Layout editor and the Schematic editor.

5

Page 6: Cadence Tutorial

Figure 2. The Library Manager Window

6

Page 7: Cadence Tutorial

3. Create A New Library:

a. Select File -> New -> Library ... in the either the Library manager or Log window. The Create Library window appears.

Figure 3 Create Library Window

b. Enter a library name. c. Choose “Attach to existing tech library” under Technology

library. d. Choose “TSMC 0.30u CMOS025(5M,HV FET)” for the library. This is

the process we will be using for this class. i. By attaching a tech library to our library, all the cells we will create in our library will be associated with this 0.3u process.

e. Click the “OK” button. Your new library will be added to the list in the Library Manager.

7

Page 8: Cadence Tutorial

4. Create A New Schematic:

a. Click on the name of the library you just created. We will now add a new cell to this library.

b. Select File -> New -> Cell View ... in the Library Manager. The Create New File window appears.

Figure 4. Create New File Window

c. Enter the schematic name in “Cell Name”. d. Choose Tool “Composer-Schematic”. e. The View Name should be “schematic”, which associates this cell view

with the Schematic editor. f. The Library Name should be the name of the library you created.

a. If not, click the “-“ next to the Library Name and select your library from the list.

g. Click “OK”. The Composer-Schematic Window will appear.

8

Page 9: Cadence Tutorial

Figure 5. Composer-Schematic Window

9

Page 10: Cadence Tutorial

5. Adding Components to the Schematic:

a. Select Add –> Instance from the schematic menu. The Component Browser and Add Instance windows will appear.

1) There are many shortcut keys to menu items. Usually it is faster to use the shortcut keys instead of using the menus.

2) Press the “i” key to add an instance b. Choose the “NCSU_Analog_Parts” library.

Figure 6. Component Browser and Add Instance Windows

10

Page 11: Cadence Tutorial

c. Select “N_Transistors” from the list. 1) Click on “nmos4” 2) Switch to the Schematic Window and place the transistor by

clicking somewhere on the schematic.

d. Press the “Esc” key to stopping adding instances. e. Click on the nmos component you just placed. The component will be

surrounded by a white border, when it is highlighted. f. Press the “q” key to edit the component properties. g. Change the Width to 10u (it will be set to 9.975u, which is the closest

multiple of 0.3). In this example, leave the Length at the process minimum. But, in your design you may want to change the length also.

11

Page 12: Cadence Tutorial

Figure 7. Add Instance Window

12

Page 13: Cadence Tutorial

h. Press “i” on the keyboard to add more components. i. Select “R_L_C” from the list to place resistors, inductors, and capacitors.

1) Add a 50k resistor (“res”) to your schematic. 2) To change the component values, click on the part in the schematic

and press “q”. Remember to press “Esc” on the keyboard to stop adding instances.

j. Select “Voltage_Sources” from the list. 1) Add a “vsin” source

i. Set the “AC Magnitude” to 1. This value is used in AC (Frequency Domain) Simulations.

ii. Set the “Amplitude” to 2m and the “Frequency” 10k. These values are used in Transient (Time Domain) Simulations.

iii. Apply a gate voltage: set the “DC Voltage” to 0.5 2) Add a “vdc” source with a 2.5 “DC Voltage”

k. Select “Supply_Nets” from the list. These components allow us to connect nodes (nets) together without drawing lines.

1) Add “gnd” and “vdd” components to the schematic. l. Hit the “Esc” key in the Schematic Window, when you are finished placing

components.

13

Page 14: Cadence Tutorial

6. Connecting Components in the Schematic:

Connect the component with wires. a. You can add wires by selecting Add -> Wire, then left click where you

want you end points. Hit “Esc” when you are finished adding your wire. b. It is much easier to just left click and drag the component’s node (the red

squares) to form lines. c. Connect the components as shown in Figure 8.

Figure 8. Common Source Amplifier

d. You can label “in” and “out”, by selecting Add -> Wire Name e. Remember to connect the bulk to the source.

14

Page 15: Cadence Tutorial

f. Save your work by selecting Design -> Check and Save

****NOTE: It is important to “Check and Save” every time you make a change to the schematic. If you don’t, the simulator will not complete successfully until the schematic is “Checked”. There are design rules for schematic entry. When you perform a “Check”, your schematic is compared with the design rules.

15

Page 16: Cadence Tutorial

7. Simulator Setup:

a. From the Schematic menu select Tools -> Analog Environment. The Analog Design Environment window will appear as shown in Figure 9.

Figure 9. Analog Design Environment Window

b. Select Setup –> Simulator/Directory/Host ... in the Analog Environment window.

c. Choose spectre and click OK.

Figure 10. Choosing a Simulator Window

16

Page 17: Cadence Tutorial

d. Select Setup –> Model Libraries e. Add the TSMC 0.3u model files for NMOS and PMOS devices.

/usr/local/cadence/NCSU/local/models/spectre/standalone/tsmc25N.m /usr/local/cadence/NCSU/local/models/spectre/standalone/tsmc25P.m

Figure 11. Add Model Library File Window

17

Page 18: Cadence Tutorial

8. DC Analysis:

a. Select Analyses –> Choose in the Analog Environment window. b. Click on “dc” c. Select “Save DC Operating Point”.

Figure 12. Analyses Setup Window

d. Click “OK” e. Select Simulation -> Run in the Analog Design Environment window f. Once the simulation is complete click on

Results -> Annotate -> DC Node Voltages and Results -> Annotate -> DC Operating Points. Now the DC voltages, currents and other information will appear on the schematic.

18

Page 19: Cadence Tutorial

NOTE: If the Annotate section is not highlighted, then the simulation was unsuccessful. Look in the ICFB Log window for more information about the reason for the failure. Make sure that the DC conditions of the circuit are correct, before performing other analyses.

19

Page 20: Cadence Tutorial

9. Transient Analysis:

a. Select Analyses -> Choose … in the Analog Environment window. b. Click on “tran” and enter the stop time for the simulation.

c. Click OK d. Make sure you have entered the Amplitude 10m and Frequnecy 10K for

the vsin source in the schematic. These values are used in the Transient Analysis.

e. Select Outputs -> To Be Plotted -> Select on Schematic. f. Return to the Schematic editor, and select the desired outputs.

1) Click on a wire or a wire name to choose a voltage. 2) Click on a node (the red squares) to select a current. 3) When you are done press the “Esc” key.

g. Select the input voltage and the output voltage. h. The outputs will appear under the “Outputs” section in the Analog Design

Environment window.

20

Page 21: Cadence Tutorial

Figure 13. Outputs added to Analog Environment

Note: The input and output nodes are named as “in” and “out” in the schematic for convenience. Otherwise, you would get the default net names.

i. Click on Simulation -> Run. j. The Waveform window will appear.

21

Page 22: Cadence Tutorial

Figure 14. Transient Waveforms

k. Select Axis -> Strips to view the plots on separate axes.

Figure 15. Transient Waveforms Strips

22

Page 23: Cadence Tutorial

10. AC Analysis:

a. Select Analyses -> Choose b. Disable the Transient analysis and choose AC analysis.

c. Enter the Sweep Range (100 to 1M). d. Make sure you have entered AC Magnitude for the AC source as 1. This

means the output AC Magnitude will be the gain of the circuit. e. Select Simulation -> Run

23

Page 24: Cadence Tutorial

f. If you still have the outputs selected, then the voltage magnitude will be plotted:

Figure 16. AC Voltage Magnitude, Frequency Response

g. We can also plot the Magnitude in dB. Select Results -> Direct Plot -> dB20 Magnitude in the Analog Environment Window.

h. Click on the output wire and then press the “Esc” key. i. The Magnitude in dB is plotted.

24

Page 25: Cadence Tutorial

Figure 17. AC Magnitude dB, Frequency Response

25

Page 26: Cadence Tutorial

11. Parametric Analysis: We can also assign a variable to component parameter, such as the resistance value of a resistor. Then, we can use the Parametric Analysis tool to change the variable value and run a simulation of each value.

a. Change the value of Rd to “my_Rd_variable” on the schematic. b. Select Variables -> Copy From Cellview in the Analog

Environment window. The variable “my_Rd_variable” should show up in the list of Design Variables. To assign a value, double click the “my_Rd_variable” in the list.

c. Select Tools -> Parametric Analysis ... from the Analog

Environment menu.

26

Page 27: Cadence Tutorial

d. Enter the Variable Name “my_Rd_variable”. e. Choose a Range from 10k to 50k with 5 total steps. f. Select Analysis -> Start in the Parametric Analysis window. g. Plot the Magnitude as performed in the AC Analysis section.

Figure 18. AC Simulation Using Parametric Analysis

27

Page 28: Cadence Tutorial

12. Saving State of the Analog Design Environment: We can also save the current state of the Analog Design Environment. This will save all the settings, such as the simulator and model library files selected. It will also retain the analyses, variables, and outputs selected. Then, the state can be reloaded at a later time, and all of the saved settings will return. You can continue working exactly where you left off without having to choose the settings again.

a. Select Session -> Save State in the Analog Design Environment

b. Now “state1” will be associated with this current design. The next time you

open this design schematic you can reload this state. c. Do so by selecting Session -> Load State in the Analog Design

Environment

28

Page 29: Cadence Tutorial

13. Plotting VI Characteristics: Use the following procedure to generate VI plots for a transistor. This can be accomplished by doing a DC sweep of the voltage across drain and source.

a. Build the following schematic

b. Open the Analog Design Environment. Select the spectre simulator and

add the model library file. c. Choose a DC analysis

29

Page 30: Cadence Tutorial

d. Select “Component Parameter” from the “Sweep Variable” section, as

shown above. e. Press the “Select Component” button. f. Then return to the Schematic Editor and click on the DC voltage source

connected to the drain.

30

Page 31: Cadence Tutorial

g. Select the DC voltage from the “Select Component Parameter” window,

shown above. Click “OK”. h. The Component Name and Parameter Name will appear in the Choosing

Analysis window. i. Enter a Sweep Range from 0 to 2.5. And, click “OK” to close the Choosing

Analysis window j. In the Analog Design Environment, select Outputs -> To be

Plotted -> Select on Schematic k. Return to the Schematic Editor, and click the drain node (red square) to

select the drain current as the output. Press “Esc”. l. In the Analog Design Environment, the drain current node will appear in

the Outputs section.

31

Page 32: Cadence Tutorial

Figure 19. Analog Design Environment: Drain Current Output

m. Then run the simulation.

Figure 20. VI Characteristic for Single VGS

32

Page 33: Cadence Tutorial

n. We can also perform a Parametric Analysis sweep on the value of VGS. a. In the Schematic Editor, change the value of the DC source to a

variable, “my_VGS” b. Add the variable to the Analog Design Environment, Variable ->

Copy from Cellview c. Open the Parametric Analysis tool

d. Enter the variable name and the sweep range e. Select Analysis -> Run

Figure 21. VI Characteristics for Several VGS

33

Page 34: Cadence Tutorial

14. Plotting DC Transfer Characteristics: Use the following procedure to generate the DC Transfer Characteristic of an amplifier. This can be accomplished by doing a DC sweep of the input voltage. The DC Transfer Curve provides a lot of information about the amplifier: input/output dynamic ranges and gain.

a. Consider the CS Amplifier below

b. Setup a DC Sweep Analysis for the DC voltage of the input source. c. Plot the output of the amplifier (in this case labeled “out”).

34

Page 35: Cadence Tutorial

Figure 22. DC Transfer Characteristic

35

Page 36: Cadence Tutorial

15. Plotting Rin and Rout: Use the following procedure to plot the input and output impedances of an amplifier. This can be accomplished by doing a AC sweep of the input or output Magnitude.

a. Consider the circuit below for Rin:

b. Setup an AC Analysis that sweeps the Magnitude of the AC input source.

36

Page 37: Cadence Tutorial

c. Specify the Frequency of the signal (10k), and enter the Sweep Range. d. Click “OK”. e. In the Analog Design Environment, select Outputs -> Save All

37

Page 38: Cadence Tutorial

f. We need to save the AC currents, so select “yes” for “Select AC terminal

currents (useprobes)”. Click “OK” g. Setup the drain node as an output by selecting it on the schematic. h. Run the simulation.

38

Page 39: Cadence Tutorial

Figure 23. Slope = 1/Rin

i. You can quickly measure the slope of the plot by using the Delta Tool: select Trace -> Delta from the menu.

j. Rout can be found in a similar fashion. Consider the circuit below

k. Setup the analysis like we did for Rin, but sweep the AC Magnitude of the

AC source at the output. l. Run the simulation

39

Page 40: Cadence Tutorial

Figure 24. Slope = 1/Rout

40