cadence tutorial commented

Upload: alan-sam

Post on 04-Jun-2018

239 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Cadence Tutorial Commented

    1/40

    Cadence Tutorial

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

    1. We will be using the TSMC 0.3d(L=0.25um) process availablein the NCSU Design Kit.

    2. We will also be using spectrefor simulation.

    The following tutorial will guide you through the basic setup and operationof Cadence ICFB. You will build a schematic and perform several analyses.

    1

  • 8/13/2019 Cadence Tutorial Commented

    2/40

    Quick Tips

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

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

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

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

    2

  • 8/13/2019 Cadence Tutorial Commented

    3/40

    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 2311. Parametric Analysis 26

    12. Saving State of the Analog Design Environment 2813. Plotting VI Characteristics 29

    14. Plotting DC Transfer Characteristics 34

    15. Plotting Rin and Rout 36

    3

  • 8/13/2019 Cadence Tutorial Commented

    4/40

    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

    ii.Change the directory to cadence5 by executing the following

    command: % cd cadence5

    iii. The following command should be executed to source cadence.

    source /usr/local/cadence/NCSU_151/ncsu.cshrc

    iv. Execute

    icfb: % icfb&

    4

  • 8/13/2019 Cadence Tutorial Commented

    5/40

    2. Startup Screens:

    W hen 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 Logwindow also displays useful output, such as if a simulation run completessuccessfully or unsuccessfully.

    Figure 1. The ICFB Log Window

    The Library Manager provides organization for components and design files.

    Cadence files are organized into Libraries. Cadencefiles are structured objectscalled Cells. Each Cell can have several different Views. These Viewsare associated with a particular Cadence tool, such as the Layout editor and theSchematic editor.

    5

  • 8/13/2019 Cadence Tutorial Commented

    6/40

    Figure 2. The Library Manager Window

    6

  • 8/13/2019 Cadence Tutorial Commented

    7/40

    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 NCSU_Techlib_tsmc_03d for the library. This is

    the process we will be using for this class.

    (By attaching a tech library to our library, all the cells we will createin our library will be associated with this 0.3d process.)

    e. Click the OK button. Your new library will be added to the list in the

    Library Manager.

    *

    Please do not refer to the library name in the figure; only follow instructions above.

    7

  • 8/13/2019 Cadence Tutorial Commented

    8/40

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

  • 8/13/2019 Cadence Tutorial Commented

    9/40

    Figure 5. Composer-Schematic Window

    9

  • 8/13/2019 Cadence Tutorial Commented

    10/40

    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 instanceb. Choose the NCSU_Analog_Parts library.

    Figure 6. Component Browser and Add Instance Windows

    10

  • 8/13/2019 Cadence Tutorial Commented

    11/40

    c.Select N_Transistors from the list.

    1)Click on nmos4 2) Switch to the Schematic Window and place the transistorby 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 willbe 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 closestmultiple of 0.3). In this example, leave the Length at the processminimum. But, in your design you may want to change the length also.

    11

  • 8/13/2019 Cadence Tutorial Commented

    12/40

    Figure 7. Add Instance Window

    12

  • 8/13/2019 Cadence Tutorial Commented

    13/40

    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 theschematic and press q. Remember to press Esc on thekeyboard 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 inAC (Frequency Domain) Simulations.

    ii. Set the Amplitude to 2m and the Frequency10k. Thesevalues are used in Transient (Time Domain) Simulations.

    iii. Apply a gate voltage: set the DC Voltage to 0.52)Add a vdc source with a 2.5 DC Voltage

    k.Select Supply_Nets from the list. These components allow us toconnect 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 finishedplacing components.

    13

  • 8/13/2019 Cadence Tutorial Commented

    14/40

    6. Connecting Components in the Schematic:

    Connect the component with wires.

    a. You can add wires by selecting Add -> Wire , then left click where youwant 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 (thered 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

  • 8/13/2019 Cadence Tutorial Commented

    15/40

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

    ****NOTE: It is important to Check and Save every time you make a changeto the schematic. If you dont, the simulator will not complete successfully untilthe schematic is Checked. There are design rules for schematic entry. Whenyou perform a Check, your schematic is compared with the design rules.

    15

  • 8/13/2019 Cadence Tutorial Commented

    16/40

    7. Simulator Setup:

    a. From the Schematic menu selectTools -> Analog Environment . The Analog DesignEnvironment window will appear as shown in Figure 9.

    Figure 9. Analog Design Environment Window

    b.Select Setup> Simulator/Directory/Host ... in the AnalogEnvironment window.

    c.Choose spectre and click OK.

    Figure 10. Choosing a Simulator Window

    16

  • 8/13/2019 Cadence Tutorial Commented

    17/40

    d.Select Setup> Model Libraries

    e. Add the TSMC 0.3d model files for NMOS and PMOS devices.

    /usr/local/cadence/NCSU/local/models/spectre/standalone/tsmc25dN.m/usr/local/cadence/NCSU/local/models/spectre/standalone/tsmc25dP.m

    Figure 11. Add Model Library File Window*

    *Please do not refer to the names of the model files in the figure; only follow instructions above.

    17

  • 8/13/2019 Cadence Tutorial Commented

    18/40

    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 andResults -> Annotate -> DC Operating Points . Now the DC

    voltages, currents and other information will appear on the schematic.

    18

  • 8/13/2019 Cadence Tutorial Commented

    19/40

    NOTE: If the Annotate section is not highlighted, then the simulation wasunsuccessful. Look in the ICFB Log window for more information aboutthe reason for the failure.

    Make sure that the DC conditions of the circuit are correct, beforeperforming other analyses.

    19

  • 8/13/2019 Cadence Tutorial Commented

    20/40

    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 10Kfor the vsin source in the schematic. These values are used in theTransient 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

  • 8/13/2019 Cadence Tutorial Commented

    21/40

    Figure 13. Outputs added to Analog Environment

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

    i.Click on Simulation -> Run .

    j.The Waveform window will appear.

    21

  • 8/13/2019 Cadence Tutorial Commented

    22/40

    Figure 14. Transient Waveforms

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

    Figure 15. Transient Waveforms Strips

    22

  • 8/13/2019 Cadence Tutorial Commented

    23/40

    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

  • 8/13/2019 Cadence Tutorial Commented

    24/40

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

    Figure 16. AC Voltage Magnitude, Frequency Response

    g.We can also plot the Magnitude in dB. Select Results -> DirectPlot -> 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

  • 8/13/2019 Cadence Tutorial Commented

    25/40

    Figure 17. AC Magnitude dB, Frequency Response

    25

  • 8/13/2019 Cadence Tutorial Commented

    26/40

    11. Parametric Analysis:

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

    a. Change the value of Rd to my_Rd_variableon the schematic.

    b.Select Variables -> Copy From Cellview in the Analog

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

    c. Select Tools -> Parametric Analysis ... from the AnalogEnvironment menu.

    26

  • 8/13/2019 Cadence Tutorial Commented

    27/40

    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

  • 8/13/2019 Cadence Tutorial Commented

    28/40

    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 filesselected. It will also retain the analyses, variables, and outputs selected.Then, the state can be reloaded at a later time, and all of the savedsettings will return. You can continue working exactly where you left offwithout 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 DesignEnvironment

    28

  • 8/13/2019 Cadence Tutorial Commented

    29/40

    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 simulatorand add the model library file.

    c. Choose a DC analysis

    29

  • 8/13/2019 Cadence Tutorial Commented

    30/40

    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 voltagesource connected to the drain.

    30

  • 8/13/2019 Cadence Tutorial Commented

    31/40

    g. Select the DC voltage from the Select Component Parameterwindow, shown above. Click OK.

    h. The Component Name and Parameter Name will appear in theChoosing Analys is window.

    i.

    Enter a Sweep Range from 0 to 2.5. And, click OK to close the ChoosingAnalys is 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 appearin the Outputs section.

    31

  • 8/13/2019 Cadence Tutorial Commented

    32/40

    Figure 19. Analog Design Environment: Drain Current Output

    m. Then run the simulation.

    Figure 20. VI Characteristic for Single VGS

    32

  • 8/13/2019 Cadence Tutorial Commented

    33/40

    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

  • 8/13/2019 Cadence Tutorial Commented

    34/40

    14. Plotting DC Transfer Characteristics:

    Use the following procedure to generate the DC Transfer Characteristic of anamplifier. This can be accomplished by doing a DC sweep of the inputvoltage. The DC Transfer Curve provides a lot of information about theamplifier: 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

  • 8/13/2019 Cadence Tutorial Commented

    35/40

    Figure 22. DC Transfer Characteristic

    35

  • 8/13/2019 Cadence Tutorial Commented

    36/40

    15. Plotting Rin and Rout:

    Use the following procedure to plot the input and output impedances of anamplifier. This can be accomplished by doing a AC sweep of the input oroutput Magnitude.

    a. Consider the circuit below for Rin:

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

    36

    36

  • 8/13/2019 Cadence Tutorial Commented

    37/40

    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

  • 8/13/2019 Cadence Tutorial Commented

    38/40

    f. We need to save the AC currents, so select yes for Select ACterminal currents (useprobes). Click OK

    g. Setup the drain node as an output by selecting it on the schematic.

    h. Run the simulation.

    38

  • 8/13/2019 Cadence Tutorial Commented

    39/40

    Figure 23. Slope = 1/Rin

    i. You can quickly measure the slope of the plot by using the DeltaTool: 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 ofthe AC source at the output.

    l. Run the simulation

    39

  • 8/13/2019 Cadence Tutorial Commented

    40/40

    Figure 24. Slope = 1/Rout