Lab 1 Schematic Inst 1
Lab 1 Schematic Inst 1
PART A: Procedure
1) Open a console and create a folder in your home directory for Lab 1 “ELEC4708/lab1”
>mkdir ELEC4708
>cd ELEC4708
>mkdir lab1
>cd lab1
2) Start Cadence environment with 0.18 technology file.
>startCds –t cmosp18 –b icfb
3) Close the “What’s New” window. You will have “icfb” window open.
5) Click File -> New -> Library. Type “lab1” in Name field. Click OK.
7) Select “cmosp18” from the drop down menu of the Technology Library. Click OK.
8) Highlight the new library you have just created, i.e. “lab1”, and click File -> New -> Cell
View. Type “NAND” in Cell Name. Keep the default values in other fields as shown.
Click OK.
9) A blank Virtuoso Schemetic Editing window will open. Move your cursor through the
icons on the left side and pop-up descriptions for each will show up. The next thing we
10) To add an instance in your schematic, you can click on Instance icon, or click on Add ->
Instance, or simply type “i” from the keyboard. Add Instance dialog box will show up.
11) Click Browse beside Library. Library Manager will pop up.
12) In Library, select “cmosp18”, in cell select “pfet”, in view select “symbol”. Then click
Close.
13) Click Hide and place the instance in your design. You can place multiple instances of
same item. When you are done with placing all the instances of that item, press Esc to get
rid of it.
15) Repeat steps (10) to (14) for “nfet”s from the same library and place them in your design.
16) To add pins, click on Pin from tools button on the left side, or click Add -> Pin, or
simply type “p” from the keyboard. Add Pin dialog box will open.
17) Type the names of the pins you want to add in sequence, leaving a blank space in
between. DO NOT click Hide button. You will need to change Direction property for
some of the pins.
20) Click hide, and connect the pins with FETs properly to form a NAND gate. Notice that
you have to connect the substrate of pfets and nfets properly.
21) Click on “Check and Save”, the first icon on the left hand side toolbar, or click Design -
> Check and Save, or simply type “X” from the keyboard to save the file.
22) You might get errors and warnings at this point. Note that Virtuoso will produce warning
if a junction has more than 3 wires connected. To avoid this, you can reroute one wire to
form 2 junctions instead of 1.
Change this to
23) Get rid of all errors and warnings. Ask TAs if you need help. Next thing we will do is
create a symbol for our NAND gate.
26) Symbol Generation Options dialog box will open. Cut and paste GND from Top Pins
field to Bottom Pins field. The dialog box should look like this. Click OK.
27) Virtuoso Symbol Editing window will open. You can keep the default rectangular shape
or change it to your own as you like. To change shape, select and delete rectangular box,
click on Line icon in the left side toolbox, select shape and line width as necessary and
draw a new shape. You can also move the pins around if you like. This step is optional.
30) A blank Virtuoso Schematic Editing window will open. Press “i” to Add Instance. Click
Browse. From Library Browser, select lab1 from Library, NAND from Cell, symbol from
view. (From now on, this selection sequence will be given as: lab1 -> NAND -> symbol)
Click Close. Place the NAND gate in your blank Virtuoso window. Press Esc.
32) Press “i” again to Add Instance. Click Browse. From Library Browser, select analogLib -
> gnd -> symbol. Click Close. Place the “gnd” in your design. Press Esc.
33) Press “i” again to Add Instance. Click Browse. From Library Browser, select analogLib -
> vpulse -> symbol. They will serve as input signals for input A and B (through
inverters). Click Close. Place 2 (two) “vpulse” in your design. Press Esc. Note that to
complete this lab, you might need to use vpwl as input signals. Ask TAs if you need help.
34) Press “i” again to Add Instance. Click Browse. From Library Browser, select analogLib -
> cap -> symbol. This will serve as output load for output inverter. Click Close. Place the
“cap” in your design. Press Esc.
35) Press “i” again to Add Instance. Click Browse. From Library Browser, select lab1 ->
Inv0 -> symbol. Place three inverters in you design. Two of the inverters between
vpulses (or vpwl) and input A and B. Third inverter between C and output capacitor.
36) Select wire (narrow) and connect all the symbols properly. If you need to pan around
use the cursor arrow keys. Use “[“ or “]” to zoom in or out by factor of 2. Use “z” to
zoom to window. Your design should be similar to this one.
41) Look at the picture in step (36). Each component of your design should show similar
values.
42) To simulate our design, we will use Virtuoso Analog Design Environment. Click Tools
-> Analog Environment to access the dialog box for Virtuoso Analog Design
Environment.
43) Click Setup -> Model Libraries. In the Model Library Setup window, Enter this line to
Model Library File: /CMC/kits/cmosp18.5.2/models/spectre/icfspectre.init. Click OK.
Then click Add to add this model in your dialog box. Click OK.
45) Click Outputs -> To Be Plotted -> Select On Schematic. Click the input wire
connected to A, the input wire connected to B and the output wire connected to C. Now
your Virtuoso Analog Design Environment should look like this.
49) Click on delay. Place the cursor in Signal 1 box and click Vt. The schematic window
should pop up. Select wire A. Place the cursor in Signal 2 box and click Vt again. The
schematic window should pop up again (if it does not, select it and then select Vt again).
Select wire C. Change Threshold value 1 to 0.9 (do not use the numpad buttons). You can
choose edge type (rising, falling, either), so that any combinations of rising and falling
can be found. Click the button >>>. Change Threshold value 2 to 0.9. Click Apply. Go to
Setting Outputs window and click Get Expression. Give a Name of the expression. Click
Add and then OK. Click Simulation -> Netlist and Run. The value will be shown in this
window.
50) If you need to use a variable (for sweeping etc.), then you can do it using the schematic
window. It is a good practice to assign variables to the parameters that you might want to
change/sweep. Give meaningful names variables so that you can recognize them later.
For example, if you want to sweep the frequency of excitation, select any of the Vpulse,
and press “q” to open the properties window. Enter Period = T and Pulse Width = T/2.
Do the same for the other Vpulse, too.
51) From the Analog Design Environment, click Variables -> Copy from Cellview. T should
appear under Design Variable list.