cadence ncsu tutorial
Post on 21-Apr-2015
Embed Size (px)
Tutorial:Analog Artist with HSPICE for the CDKhttp://www.eda.ncsu.edu/wiki/Tutorial:ContentsThis tutorial will introduce you to the Cadence Environment: specifically Composer, Analog Artist and the Results Browser. It will also show you how to use the simulator HSPICE in stand-alone mode to make certain parts of your design exploration easier. ECE 546Students: This tutorial is designed to introduce you to the tools we will use in class. Proficient use of Cadence and Hspice will allow you to complete the projects and homework quickly, and will make the class more fun. Practice is really the only way to achieve such proficiency. There are probably an infinite number of tricks and shortcuts to make the design process easier, or at least enough to fill a small book. No tricks or short-cuts are covered in this tutorial and it will be up to you learn more about the tool and how you can use it better for your needs. Lastly, the screen-shots in this tutorial may vary slightly from what you will see. Refer to the text next to the screen-shot for up-to-date information. Note also that some screen-shots have been shrunk to make the page more readable. In this case, please click on the image to view its wiki-page, and click on the image again to download the full-size image.
Start the Cadence Design Framework1. Type add cadence at the command prompt. This will add the tool to your search path. 2. Make directory called something like Artist. Change to this directory. 3. Start the Cadence Design Framework by typing icfb & at the command prompt.% % % % add cadence_cdk add cadence2005 mkdir Artist cd Artist
% icfb &
The screen below illustrates the output after the add command. Note, however, that you should see the Cadence 2004 version.
The first window that appears is called the CIW (Command Interpreter Window).
Another window that appears is the Library Manager. This window allows you to browse the available libraries and create your own.
Create the myInverter SchematicIn the Library Manager, create new library called ArtistTutorial. Select File->New>Library. This will open new dialog window, in which you need to enter the name of your library, library path, and "Attach to existing tech library" (TSMC 0.20u should be
selected rather than the older technology pictured below). You can leave the "Path" field blank, or set it to ".". the library will be created in your working directory. After you fill this all out, the window should look something like this:
You should see the library "ArtistTutorial" appear in the Library Manager.
Next, select the library you just created in the Library Manager and select File->New>Cell View.... We will create a schematic view of an inverter cell. Simply type in "myInverter" under cell-name and "schematic" under view. Click OK or hit "Enter". Note that the "Tool" is automatically set to "Composer-Schematic", the schematic editor.
Alternatively, you can select the "Composer-Schematic" tool, instead of typing out the view name. This will automatically set the view name to "schematic".
After you hit "OK", the blank Composer screen will appear. The image below shows the final schematic that we will make in this tutorial.
To generate a schematic like this, you will need to go through the following steps: From the Schematic Window, choose Add->instance. The Component Browser, will then pop up.
In the Library field, select NCSU_Analog_Parts. We will place the following instances in the Schematic Window from the NCSU_Analog_Parts library as instructed below:N_Transistor: P_Transistor : Supply_Nets : R_L_C : nmos pmos vdd , gnd cap
Voltage_Sources : vdc,vpulse
Note: pay special attention to the parameters specified in vdc, vpulse, and cap. These parameters are very important in simulation.
Place pmos instance
In Component Browser, select P_Transistors and then pmos. Place it in the Schematic Window
Place nmos instance
In Component Browser, select N_Transistors and then nmos. Place it in the Schematic Window.
Place gnd instance
In Component Browser, select Supply_Nets and then gnd. Place it in the Schematic Window.
Place vdd instance
In Component Browser, select Supply_Nets and then vdd Place it in the Schematic Window.
Place IN pin
From the Schematic Window menu, select Add -> Pin... In the Pin Name field , enter IN In the Direction field, select input Place it in the Schematic Window
Place OUT pin
From the Schematic Window menu, select Add -> Pin... In the Pin Name field , enter OUT In the Direction field, select output Place it in the Schematic Window
Place vdc instance
In the Component Browser, select Voltage Sources and then vdc In the DC voltage field, enter 1.8 V (not 5 V as pictured below) Place it in the Schematic Window
Place vpulse instance
In the Component Browser, select Voltage_Sources and then vpulse Enter the following values in the form:0V 1.8 V 100p s 100p s 1n s
Voltage 1: Volrage 2: Rise Time: Fall Time: Period:
Delay Time: 0 s
Pulse Width: 400p s
Place it in the Schematic Window
Place cap instance
In Component Browser, select R_L_C and then cap
In the Capacitance field, enter OutCap F. (This Design Variable will be used in Artist.)
Place it in the Schematic Window
In the Schematic Window menu, select Add -> Wire (narrow) Place the wire to connect all the instances Select Design -> Check and Save.
Look at the CIW. You should see a message that says:Schematic check completed with no errors. "ArtistTutorial myInverter schematic" saved
If you do have some errors or warnings the CIW will give a short explanation of what those errors are. Errors will also be marked on the schematic with a yellow or white box. Errors must be fixed for your circuit to simulate properly. When you find a warning it is up to you to decide if you should fix it or not. The most common warnings
occur when there is a floating node or when there are wires that cross but are not connected. Just be sure that you know what effect each of these warning will have on your circuit when you simulate. Your schematic should look like the one shown below. Note that your transistors will have the model tsmc20N and tsmc20P, the widths will be 300n, and the lengths will be 200n.
If you would like to learn more about the schematic editor, you can work through chapters 1-5 of the Composer Tutorial that comes with the Cadence documentation. Start the documentation browser by typingcdsdoc &
at the command prompt, make sure that IC5.0.332 is selected in the Active Library pull-down box at the top, and then select Virtuoso Composer->Virtuoso Schematic Composer Tutorial in the browser window that appears. This should start an HTML browser that displays the table of contents for the tutorial. You may also find the Virtuoso Schematic Composer User Guide very helpful to describe some of the further commands available in the schematic editor. If you find that you cannot view the figures correctly in the web browser, you can click the View/Print PDF link at the top of the page to launch a PDF viewer for the tutorial. This documentation browser offers many more links for you to learn about the Cadence Design Framework.
Simulate the Schematic with HSPICE within Analog ArtistSet up the Simulation EnvironmentYou are now prepared to simulate your circuit. From the Schematic Window menu, select Tools -> Analog Environment A window will pop-up. This window is the Analog Artist Simulation Window.
Choose a Simulator
From the Analog Artist menu, select Setup -> Simulator/Directory/Host. Enter the fields as shown below. Choose hspiceS as your simulator. Your simulation will run in the specified Project Directory. You may choose any valid pathname and filename that you like.
Choose AnalysisWe will do Transient Analysis on the circuit that we just produced. From the Analog Artist menu, select Analyses -> Choose... Fill out the form with the following values (not pictured): o From: 0 o To: 2n o By: 10p
Add a VariableFrom the Analog Artist menu, select Variables -> Edit The Editing Design Variables form will appear. Fill out the form as shown below, and then click Add to send this Variable to the Table of Design Variables. (Recall that we entered the OutCap Design Variable in the Capacitor component while editing the schematic in the previous section.)
Setup OutputWhen using Transient Analysis, the transient voltage will be saved automatically. We can save the current through capacitor C0 in the schematic by doing the following: From the Analog Artist menu, select Outputs -> To be Saved -> Select On Schematic In the Schematic Window, click on the lower terminal (not the wire) of capacitor C0. After you click on the terminal, the Analog Artist Window should look like this:
From the Analog Artist menu, select Simulation -> Run, Look at the echoing information in the CIW window. If the simulation succeeds, the window will display ...successful.
If the simulation is unsuccessful, then one of the error messages should provide a clue as to what went wrong. Remember that you can move elements around in your schematic by clicking and dragging them. You can delete them by selecting them and pressing the delete key. You modify the properties of the elements by selecting them and pressing the q key. If you would like to learn more about the Analog Design Environment, select Analog Design Environment->Cadence Analog Design Environment User Guide in the cdsdoc browser window.
View WaveformsFrom the Analog Artist men