You are on page 1of 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.

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.

Contents:

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15.

Cadence Startup Startup Screens Create A New Library Create A New Schematic Adding Components to the Schematic Connecting Components in the Schematic Simulator Setup DC Analysis Transient Analysis AC Analysis Parametric Analysis Saving State of the Analog Design Environment Plotting VI Characteristics Plotting DC Transfer Characteristics Plotting Rin and Rout

4 5 7 8 10 14 16 18 20 23 26 28 29 34 36

1. Cadence Startup: a. Cadence is started from a terminal i. To open a terminal: right click on the desktop and select new Terminal. Or, press Ctrl+t on the keyboard b. Running Cadence for the 1st time i. Several configuration files must be copied to your home directory. This process is automated by running the following command: % source /usr/local/cadence/NCSU/setup_files/setup_cadence ii. You will notice that a directory cadence was created and several files were copied into it. iii. To start Cadence type the following: % icfb& c. Starting Cadence after the 1st time i. Open a new terminal. ii. Changes directories to cadence % cd cadence iii. Execute icfb: % icfb&

2. Startup Screens: When ICFB starts, two windows appear: the ICBF Log window (Figure 1) and the Library Manager (Figure 2). The Log window is the main window for ICFB. User preferences and other options are accessed through its menus. The Log window also displays useful output, such as if a simulation run completes successfully or unsuccessfully.

Figure 1.

The ICFB Log Window

The Library Manager provides organization for components and design files. Cadence files are organized into Libraries. Cadence files are structured objects called 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.

Figure 2.

The Library Manager Window

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.

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.

Figure 5. Composer-Schematic Window

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

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

Figure 7. Add Instance Window

12

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

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 components 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

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 dont, 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

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

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/tsm c25N.m /usr/local/cadence/NCSU/local/models/spectre/standalone/tsm c25P.m

Figure 11. Add Model Library File Window

17

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

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

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

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

Figure 14. Transient Waveforms k. Select Axis -> Strips to view the plots on separate axes.

Figure 15.

Transient Waveforms Strips

22

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

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

Figure 17. AC Magnitude dB, Frequency Response

25

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

d. e. f. g.

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

Figure 18. AC Simulation Using Parametric Analysis

27

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

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

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

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

Figure 19. Analog Design Environment: Drain Current Output m. Then run the simulation.

Figure 20. VI Characteristic for Single VGS

32

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

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

Figure 22.

DC Transfer Characteristic

35

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

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

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

Figure 23. Slope = 1/Rin

i. j.

You can quickly measure the slope of the plot by using the Delta Tool: select Trace -> Delta from the menu. 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

Figure 24. Slope = 1/Rout

40

You might also like