University of Southern California
Department of Electrical Engineering - Systems
EE 477 Laboratory #1
Logic Gate Design/Layout and Simulation Experiments
with Combinational CellsDue 10/29/16, 5:00 PM Via the DEN Online Assignment Function (100 points, worth 8% of final grade)
YOU MUST WORK INDEPENDENTLY ON THE LABS: THERE ARE NO PROJECT GROUPS
1. (27%) CIRCUIT DESIGN: Use CADENCE Virtuoso schematic capture to design complementary CMOS logic gates at the transistor circuit level for the following functions:
- 3 inverters,
- transmission gate,
- 2-input NAND,
- 3-input NAND, and
- a compound gate that implements the function COMPOUT = NOT {[A+B+C] *[D+E+F+G]* [H+I]}
SIZING RULES:
Your lab technology lambda is 100 nm. Assume Vdd = 1.8v. For your schematic and layout you must make the transistor dimensions in multiples of .5 lambda.
A. The Basic Inverter #1: The NMOS and PMOS transistors in the inverter should be "unit" sized, as defined in the text and lectures, paying attention to the current design rules in the lab.
B. The Larger Inverter #2: Size both the transistors in this inverter 4 times as wide as in the basic inverter. Remember that you can put two or more unit-sized transistors in parallel in place of widening a single transistor if it helps keep your methodology consistent.
C. The Largest Inverter #3: Size both the transistors in this inverter 4 times as wide as Inverter #2. For inverter #3, Experimentally determine a value for transistor k (beta) ratio. Hint: You might want to determine when both transistors are in saturation and use Vin at that point to find the ratio.
D. The Transmission gates: Size the transistors the same as the inverter #1 transistors.
E. The NAND gates: For the 2-input and 3-input NAND gates, use unit size NMOS transistors and make the PMOS transistors wide enough to have rise and fall times within 10% of each other in the worst case. In other words, rise time < 1.1 x fall time or fall time < 1.1 x rise time.
F. The compound gate: For the compound gate, experiment with transistor widths that give output rise and fall times within 20% of each other, in the worst case. Note that the sequence of inputs that give worst-case timing might be different from the required input sequences specified below. Note also that when you have adjusted the critical path, other paths may need adjustment as well. Worst-case timing and critical paths will be discussed in class. You can manipulate the Boolean equation as desired. Include your choice of worst-case path in your discussion.
=======================================================================================================================
2. (20%) SIMULATION: a) Simulate your transistor circuits (Cadence circuits) using SPECTRE to determine that they function properly, and to obtain information for device sizing as described above.
SIMULATION RULES:
* Label your inputs A, B, C and so on. For example, the 2-input gates have inputs A and B. Label your outputs INV1OUT, NAND2OUT, etc.
* Attach your inverter #1 design to the output of each gate (including the inverter) prior to circuit extraction and simulation to provide a load capacitance. The output you should plot is the input to this load inverter.
* Simulation timing: Assume .05ns rise and fall time for your inputs. Hold all input values stable for at least 1.8ns.
* Show simulations of each gate with all possible combinations of inputs.
* Change the inputs in the following manner:
3-input NAND: ABC = 000, ABC = 001, ABC = 010....etc.
2-input NAND: For the 2-input gates AB = 00, AB = 01, etc.
Compound gate: For the compound gate, simulate all combinations of A, B, C from 000 to 111, counting up in binary 000, 001, 010, etc. , while holding DEF amd GHI to 000.
In another test, hold ABC=010 and GHI to 000, and then change DEF from 000 to 111, counting up as before.
Please change the inputs in the order given so that we can grade what you are doing easily.
SIMULATION INSTRUCTIONS:
a) Simulate all designs.
b) For the 3 inverters only: Measure average current in your inverters and multiply by Vdd to obtain average power. Measure over the period from .1ns before the input falls to .1ns after the input becomes low. There is a measure method given in the tutorial we posted. Note that you need to use a load inverter so use the #1 inverter as a load as with other simulations.
c) For inverter #1 and inverter #3, increase the input voltage starting at 0.0v until the output begins falling (theoretically until the slope of the input/output transfer curve = -1 so use visual inspection, but measuring this is not easy). Then find the low noise margin, assuming VOLMAX = 0.0v. Find the high noise margin in a similar way.
Note: Low noise margin is defined as NML= VIL-VOLmax, assume VOLmax=0.0v.
High noise margin is defined as NMH= VOHmin-VIH, assume VOHmin=Vdd.
To estimate VIL and VIH so that you can compute the noise margin values, you could approximate the voltages when you see the output begins changing or find the -1 slopes on the input-output transfer curve.
=======================================================================================================================
3. LAYOUT: (30%) Layout your cells with Cadence (each circuit layout is a "cell"). Use the TSMC technology (NCSU_TechLib_tsmc02) as instructed in lab. Put at least one ntap and ptap (ohmic contacts) in each cell. If you have multiple n-wells in a cell, each needs an ohmic contact.
Required Layout Design Methodology:
Design all of your cell layouts so that they can be placed next to each other either vertically or horizontally without having layers connect that should not.
Use a uniform methodology to design all the gates, and only use metal 1 and metal 2 for interconnect.
Make sure that you minimize the use of poly and only use poly around the gate region of each transistor.
Your goal is to insure that it is easy to build more complex designs out of your gates, and to keep the cells small, with few layer changes for each connection.
You want to extend your methodology to design compound gates as well.
Keep in mind as you design the inverters that you may want to alter the design later with wider transistors, so consider how you can do that without changing your layout methodology.
At this point in the semester, try to minimize the white space to create cells that are as small as possible, but easily combined into larger circuits. One hint: you could design the cells so that the output of each cell lines up exactly with an input of every cell type. The output and input can line up horizontally or vertically.
The following is one example of such a methodology:
"Design each cell to be the same height. Power and ground will be routed horizontally later, and the input to each cell should be vertical. The output should come out horizontally on the metal 2 layer. You might want to a style similar to the cells discussed in class."
This is only an example. Instead, you might choose to design each cell to be the same width, for example. You might route the inputs to the cell horizontally, and use different layer assignments than the example.
You can put contacts for inputs and outputs somewhere inside that they can later be accessed when you connect cells to each other. The contacts do not need to be necessarily inside, that would depend on the methodology you choose to use.
=======================================================================================================================
4. (5%) VERIFICATION: Use LVS to verify that your cell layouts are identical to the schematics. You will simulate the layouts with SPECTRE in Lab 2. Note: When doing the LVS you do not need to have the load inverter. The load inverter is only used for simulation purposes and it is not part of your cell design.
=======================================================================================================================
5. (10%) ASSEMBLY: Layout a small logic block that implements the Boolean function ab + cbd + ef using only your inverter #1 and NAND gate cells from Part 3. This exercise should help you tune your cells so that they can be connected easily into logic blocks for the final project. Be sure that inputs/outputs with the same name are connected on the layout. Do not simulate or resize devices. You do not need to submit a schematic.
=======================================================================================================================
6. (8%) DOCUMENT: Submit your lab writeup. The lab writeup is worth 8% of the Lab 1 grade.
Turn in final transistor-level schematics, layouts and schematic SPECTRE simulation inputs and outputs for all cells. Turn in the layout for the logic block. You do not need to simulate this block.
Lab Report Contents (in order):
- Title page
- Transistor schematics of gates taken from Cadence. Submit your final schematic images without the load inverter attached to the output.
- Discussion and explanation of how you sized transistors, and the beta ratio you found, including measured rise and fall times.
- Description of your design methodology.
- SPECTRE input and output waveforms for each gate schematic simulation in the form of images showing the waveforms.
- Results of the power computations.
- Results of the noise margin computations
- Layouts of gates, captured as images, making sure the images are high enough resolution so the grader can see layout details and inputs/outputs are labeled. Submit your final layout images without the load inverter attached to the output.
- Table showing cell sizes (width of the cell, height of the cell and cell area for all the cell layouts). The cell area is the width times length of the bounding box of your layout.
- Layout of the logic block, captured as an image.
- Conclusions about the lab, especially about sizing the transistors in the compound gate.
- LVS results as separate files (see below).
Your lab report should be a pdf file. Please do not submit a .doc or .docx file. Name the report as follows: LastnameLab1.pdf
Include as separate files: Each file called si.out generated in a folder called LVS showing the results either match or mis-match for each cell layout. Be sure you rename the si.out file after each cell is verified to something like NAND2.out. Otherwise it will get overwritten.
Use the "tar function" on UNIX to put all the files including the report into a single file. (See wikipedia for instructions on how to tar a file). Do not put into rar format. Students submitting multiple files will lose points. Your reports must be in pdf format.
=======================================================================================================================
Instructions on how to print your layout and waveform images in color:
For layouts:
In the layout editing window:
File->Print
"Submit Plot" window will pop up.
You can choose plot with "header" or "notes" or disabled both
Click on Plot Options
"Plot Options" window will pop up.
‧ Display type: display
‧ Plotter Name: (change to) Generic 300 dpi Adobe Post Script Level 2 Plotter (for color images)
‧ Send Plot Only To File : (type in file name ending with .ps)
Then use distill function to convert .ps to .pdf
The same instruction can be used to print the schematic.
Another alternative is to use File-->Export Image. Be sure the grader can see enough details.
Here is the instruction to print waveforms from Cadence:
File->Save as Image
>> Then enter a name and save in PNG format.
It might take several minutes so be patient. The hourglass should appear.
Submit the assignment using the Assignments function on the DEN blackboard.
=======================================================================================================================
Some Guidance from the TA:
Please be sure to use alphabetic characters to begin signal names. Cadence might have trouble with names like /A or 3A.
Cadence is case sensitive. Case sensitive means that the labels in your schematic should be consistent with the labels in your layout. For example, if in my schematic I use A for the input of the inverter then in the layout I should use A for the input of the layout inverter (If I use a instead of A it won’t work).
The label for the power supply terminal in the layout should be vdd! (do not use Vdd!), for ground use gnd! (do not use Gnd!)
************ Rise/Fall time
There is an option in the rise time window that allows you to measure all the rise times in a simulation. It is the # of occurrences. The default is “single”, you can change it. If you couldn't compute the rise time or fall time using the calculator function, you can always measure it manually. It will take some practice until you get used to managing the functions.
************Transmission gate
It is necessary to put on the schematic a floating vdd and a floating gnd in order to compare the LVS because you have them in your layout (vdd!, gnd!).
*********** Flipping layouts:
In case you need to flip the layout cells you can do the following: select the cell--> right click-->move and then select the rotate option of your preference.
****** A final comment
If the layout/schematic does not match, please verify all the pins and all the connections on each node. Also, please remember to put ntap and ptap on the layout. If you couldn't find the errors, then I suggest to repeat the layout again, though 99.9% of the time the LVS error is due to a wrong connection or wrong pin labels. These cells are small enough to be able to find the error. You can use the help of the LVS output file to identify the error.
Before sending the TA emails please try all the possible options and verify all possible layout/schematic errors. Do not send schematic/layout images by email unless told to do so..
Good luck!