Cadence Lab2

Cadence Lab2 Cadence Lab2

seas.upenn.edu
from seas.upenn.edu More from this publisher
01.07.2014 Views

ESE 570 Cadence Lab Assignment 2: Introduction to Spectre, Manual Layout Drawing and Post Layout Simulation (PLS) Objective Part A: To become acquainted with Spectre (or HSpice) by simulating an inverter, observing voltage transfer characteristics and measuring its rise and fall times with various capacitive loads. Background Part A: After a circuit is logically designed and verified, we need to make sure the assumed inter-module timing characteristics satisfy their requirements so that our digital circuit will work correctly when fabricated. That is we need to ensure that the analog characteristics of our digital circuit do not interfere with its ideal logical behavior. This is accomplished by modeling the behavior of the transistors in the circuit where such factors as temperature, capacitance, resistance, inductance are taken into account. The transistor level simulator you will be using in ESE 570 is Spectre. For all your Spectre simulations in the exercises described below, please follow the instructions given in the on-line Cadence Manual sections: Schematic Simulation: Creating a Test File for Simulating an Inverter; Spice Simulation: DC Analysis of the The Inverter; Schematic Simulation: Transient Analyses of the Inverter; Parametric Analysis with Spectre. Exercises for Part A: 1. Transient simulation (20/100 pts) Review the on-line Cadence Manual section “Schematic Simulation: Transient Analyses of The Inverter”. The simulation is to be performed with Wn/Ln = 6u/0.6u and Wp/Lp = 15u/0.6u. This can be done by editing the inverter schematic you composed in Lab 1. The manual takes the user through a transient simulation of an inverter for one value of the external component of the load capacitance, namely C ext = 25 fF, and measures only rise time. For this exercise perform a transient simulation of this inverter using a C ext = 0 and 100 fF. Use the simulation to measure both rise and fall times for both capacitance conditions. 2. Inverter DC characteristics (25/100 pts) Perform a DC sweep analysis in Spectre for the inverter constructed in exercise 1 above to find its transfer characteristics for a range Wp/Wn values. For this purpose connect a dc voltage source ‘vdc’ to the input pin of the inverter test circuit and select “DC Analyses” for the Analyses option in the Cadence Analog Artist Window. Vary the W of the nMOS transistor over the range 1u ≤ W ≤ 10u and observe the movement of the switching threshold Vth. Use the Cadence Manual section “Parametric Analysis with Spectre” as a guide to do this simulation and plot the group of curves in the data sweep. For a Wp/Wn ratio of 3/1, find the input voltage when the output voltage is equal to VDD/2 using the measuring tools in the waveform window.

ESE 570 <strong>Cadence</strong> Lab Assignment 2:<br />

Introduction to Spectre, Manual Layout Drawing<br />

and Post Layout Simulation (PLS)<br />

Objective Part A:<br />

To become acquainted with Spectre (or HSpice) by simulating an inverter, observing<br />

voltage transfer characteristics and measuring its rise and fall times with various<br />

capacitive loads.<br />

Background Part A:<br />

After a circuit is logically designed and verified, we need to make sure the assumed<br />

inter-module timing characteristics satisfy their requirements so that our digital circuit<br />

will work correctly when fabricated. That is we need to ensure that the analog<br />

characteristics of our digital circuit do not interfere with its ideal logical behavior. This<br />

is accomplished by modeling the behavior of the transistors in the circuit where such<br />

factors as temperature, capacitance, resistance, inductance are taken into account. The<br />

transistor level simulator you will be using in ESE 570 is Spectre.<br />

For all your Spectre simulations in the exercises described below, please follow the<br />

instructions given in the on-line <strong>Cadence</strong> Manual sections:<br />

Schematic Simulation: Creating a Test File for Simulating an Inverter;<br />

Spice Simulation: DC Analysis of the The Inverter;<br />

Schematic Simulation: Transient Analyses of the Inverter;<br />

Parametric Analysis with Spectre.<br />

Exercises for Part A:<br />

1. Transient simulation (20/100 pts)<br />

Review the on-line <strong>Cadence</strong> Manual section “Schematic Simulation: Transient<br />

Analyses of The Inverter”. The simulation is to be performed with Wn/Ln = 6u/0.6u<br />

and Wp/Lp = 15u/0.6u. This can be done by editing the inverter schematic you<br />

composed in Lab 1. The manual takes the user through a transient simulation of an<br />

inverter for one value of the external component of the load capacitance, namely C ext<br />

=<br />

25 fF, and measures only rise time. For this exercise perform a transient simulation of<br />

this inverter using a C ext<br />

= 0 and 100 fF. Use the simulation to measure both rise and<br />

fall times for both capacitance conditions.<br />

2. Inverter DC characteristics (25/100 pts)<br />

Perform a DC sweep analysis in Spectre for the inverter constructed in exercise 1 above<br />

to find its transfer characteristics for a range Wp/Wn values. For this purpose connect a<br />

dc voltage source ‘vdc’ to the input pin of the inverter test circuit and select “DC<br />

Analyses” for the Analyses option in the <strong>Cadence</strong> Analog Artist Window. Vary the<br />

W of the nMOS transistor over the range 1u ≤ W ≤ 10u and observe the movement of<br />

the switching threshold Vth. Use the <strong>Cadence</strong> Manual section “Parametric Analysis<br />

with Spectre” as a guide to do this simulation and plot the group of curves in the data<br />

sweep. For a Wp/Wn ratio of 3/1, find the input voltage when the output voltage is<br />

equal to VDD/2 using the measuring tools in the waveform window.


2<br />

Objective Part B:<br />

To create mask sequences for simple gates and a static D flip-flop, as well as using<br />

Spectre to do Post Layout Simulation of the D flip-flop.<br />

Background Part B:<br />

In VLSI Design powerful automated synthesis tools are used by designers to implement<br />

the physical design or layout of their chip, rather than labor intensive transistor by<br />

transistor hand-layout. Using such tools increases the designer productivity and shortens<br />

the time to market for the chip. However, before the value of such tools can be<br />

appreciated, it is instructive to do the layout of few simple circuits by hand. In doing so,<br />

one achieves a better understanding of the various timing issues associated with layout<br />

floor planning and routing – which will provide valuable intuition when designing and<br />

implementing more complex chip functions.<br />

Design Flow: Layout<br />

Once the schematic for a circuit is captured, its behavior verified logically and its analog<br />

characteristics have passed all voltage, timing and power specifications – the next step in<br />

the design flow is layout. This verification is very important – no designer wants to<br />

waste valuable time laying out circuits that have no chance of working.<br />

When laying out a circuit it is helpful to have the the transistor level schematic to help<br />

guide your placement and routing of the physical implementation of circuit elements. The<br />

layout ought to have a one-to-one correspondence to the schematic. However, the layout<br />

will undoubtedly introduce parasitic resistances and capacitances that are not accounted<br />

for in the schematic, as has been discussed in class. These parasitics can be “measured”<br />

using tools within <strong>Cadence</strong>, and they can then be back-annotated in the schematic so that<br />

the schematic reflects the actual layout in terms of timing and capacitance properties.<br />

Thus after a layout is completed it is necessary to extract from the layout all of the<br />

parasitic capacitances using the Layout Versus Schematic (LVS) tool as described in the<br />

Layout Versus Schematic (LVS) Verification section of the on-line <strong>Cadence</strong> Manual.<br />

With parasitic capacitances extracted and back-annotated into the schematic (actually the<br />

schematic net-list), the designer performs a post-layout Spectre simulation to to validate<br />

all of the circuit specifications using a model that best represents the fabricated circuit.<br />

There are a few rules of thumb to keep in mind when laying out a circuit, many of which<br />

have been mentioned in class:<br />

1. Avoid using polysilicon as a long wire or route. Use it only for local, < 6 µm<br />

connections because it has high sheet resistance of 15 to 30 Ohms/square, as well as<br />

introducing parasitic capacitance.<br />

2. Use wide metal wires or interconnect for power rails and ground, at minimum W = 4<br />

λ. especially if they are long and supplying (sourcing) a lot of current. Keep in mind that<br />

typical current density rating for metals is about 0.5 mA/µm.


3<br />

3. When changing metal layers, the number of contacts to use should follow from the<br />

current rating of the contacts themselves. The current density for each contact should be<br />

kept below 0.5 mA/µm.<br />

The Virtuoso Layout Editor:<br />

The <strong>Cadence</strong> view or window that contains the layout is called the layout view, as described<br />

in the “Create Custom Layouts” section of the on-line <strong>Cadence</strong> Manual. Opening the<br />

layout view automatically brings up the layout editor called “Virtuoso”. The long and thin<br />

rectangular window that contains all of the layers provided by the technology file is shown<br />

in the layer selection window (LSW). Selecting a layer in the LSW will allow one to<br />

subsequently draw a layout feature that uses that layer. The background represents the<br />

substrate, which in our N-well CMOS process is p material. The mask sequence for an<br />

nMOS transistor on p bulk is 1) n-diffusion; 2) active; 3) polysilicon, 4) metal1 and 5)<br />

contact. The mask sequence for an pMOS transistor on p bulk is 1) n-well diffusion, 2) p-<br />

diffusion; 3) active; 4) polysilicon, 5) metal1 and 6) contact.<br />

For simulation purposes and and standard cell design rules, it is necessary to add the PIN or<br />

pn layer, which is used for the for the input/output and vdd!/gnd! pins in the schematic.<br />

Power and ground rails should be declared as jumpers. Physical input and output pins<br />

should be in metal2 and and power/ground rail pins should be in metal1. It is a good idea to<br />

label your pins with the text layer, and make sure to name the labels the same as the pins<br />

and put them on top of the labeled wires.<br />

Once the the layout is complete run a Design Rule Check (DRC) to verify that no design<br />

rules have been violated. The running of the DRC is described in the Design Rule Check<br />

section of the on-line <strong>Cadence</strong> Manual. After the layout has been found to be free of design<br />

rule violations, the next set is parasitic extraction. The extraction tool takes the mask<br />

sequences and matches them with known sequences for various circuit elements, e.g.<br />

whenever the mask sequence 1) n-diffusion; 2) active, 3) polysilicon; 4) metal1; 5) contact<br />

is encountered it is recognized as an nMOS transistor. Parasitic capacitances are recognized<br />

whenever polysilicon or a metal layer runs over field oxide, and a simple estimate of the<br />

capacitance is made based on the area of the overlap. Parasitic resistances are not extracted<br />

because they are not implemented in our technology file. The extracted view is<br />

automatically created whenever a layout is extracted. It contains the circuit element and<br />

netlist information for the whole layout. Usually there are no errors in the extracted view<br />

unless there are unrecognized mask sequences, which need to be corrected before moving<br />

forward.<br />

The extracted view is used to compare the layout and schematic for differences that would<br />

suggest errors. This verification step is called Layout Versus Schematic (LVS). Note that<br />

the LVS is to be done from the extracted view and not the layout view. After the LVS<br />

verification is passed, the designer can do the Post-Layout Simulation (PLS) using<br />

Spectre from the extracted view. The procedure is identical to that for simulating from the<br />

schematic view. See the Post Layout Simulation section of the on-line <strong>Cadence</strong> Manual.


4<br />

Standard Cell Design:<br />

Like software libraries that a programmer uses to perform certain well-established or routine<br />

functions in a large program, hardware descriptions for VLSI design can be taken from a library<br />

of modules or cells that can be called and inserted into a functional description, schematic and<br />

layout for a VLSI circuit as often as needed. Such cells are called standard cells because their<br />

physical design or layout are done to rigid geometric standards that enable the cells to be<br />

automatically placed and routed. One such standard is that standard cells have standard height<br />

(vertical distance) and placements for power and ground rails. This enables standard cells to be<br />

placed next to each other in rows in order for their power/ground rails to be perfectly aligned.<br />

We will design gates as standard cells to take advantage of their reusability. For our standard<br />

cells the vertical distance from the top of the vdd! rail to the bottom of the gnd! rail is 100λ =<br />

30 µm (see Fig. 1).<br />

100 λ = 30 µm<br />

Figure 1 Standard Cell


5<br />

The topology of a standard cell design is that there are rows of cells alternated with rows of<br />

interconnect or routing channels such that in between every pair of standard cell rows there<br />

is a routing channel. Interconnecting wires will be routed out of and into cell blocks above<br />

and below, and passed through spaces in between. Hence, care must be taken to ensure that<br />

these wires do not violate design rules when connecting with adjacent ports. In order to use<br />

standard cells in a design it is standard procedure to first characterize each cell to specify its<br />

timing information and input/output capacitances. In the exercises in this part you will be<br />

asked to layout the Inverter (INV), 2-input NAND gate and 2-input NOR gate. In addition<br />

for extra credit, you may elect to layout an asynchronously resettable static D flip flop.<br />

To summarize the guidelines for standard cell design are as follows:<br />

1. Standard cells must adhere to rigid dimension specifications; all standard cells are to be<br />

the same height and power and ground rails must align. In our case we use 30 µm as our<br />

standard height from the top of the vdd! rail to the bottom of the gnd! rail.<br />

2. To effectively use standard cells, they must be fully simulated and characterized. This<br />

means capturing the gate switching threshold voltage V th<br />

and rise/fall times as a function of<br />

load capacitance.<br />

3. It is helpful to design the cell layout so that the input and output pins are not on the same<br />

horizontal line, as in the layouts below in Fig. 2, and they are spaced vertically by at least<br />

the edge-to-edge minimum width spacing of the metal2 wires. This will enable easy<br />

routing of interconnections between different cells while not violating design rules.<br />

Figure 2 Layouts of Inverter, 2-input NAND (ND2) gate and 2-input NOR (NR2) gate


6<br />

Exercises Part B:<br />

1. Layout of elementary gates (55/100 pts)<br />

Create and layout the elementary gates INV, 2-input NAND and 2-input NOR (draw the<br />

layouts for your designs done in <strong>Cadence</strong> Lab 1). Use Wn/Ln = 6u/0.6u and Wp/Lp =<br />

15u/0.6u for all three gates. Follow the online <strong>Cadence</strong> Tutorial for this purpose. Use the<br />

standard cell design guidelines given above. Run DRC and LVS on the layouts. Print out<br />

the mask sequences and comparison reports section of the si.log file in your LVS directory.<br />

DO NOT print out the entire file. Make sure that you use a different LVS directory for each<br />

gate. Review the Post Layout Simulation (PLS) part of the <strong>Cadence</strong> Tutorial. For the<br />

inverter do PLS and determine the V th<br />

and the propagation delays rise/fall for the external<br />

component of the load capacitances C ext<br />

= 0 and 100 fF. For the 2-input NAND and 2-input<br />

NOR do the PLS to determine the rise/fall times for all input patterns and present them in<br />

table. What are the worst case rise/fall times input patterns?<br />

In order to determine rise/fall times you may do either of the following methods:<br />

a. Use the cursors on the simulation window to find the appropriate times corresponding to<br />

90% and 10%.<br />

or<br />

b. Use the special calculator function riseTime in the Analog Environment.<br />

In order to use the calculator double click an existing output in your Analog Environment<br />

(such as OUT).<br />

You should then see an outputs manager pop up.<br />

In the Outputs Manager (See Fig. 3) Click "New Expression" and name it "riseTime" then<br />

click open calculator.<br />

Select WAVE from the left bank of calculator buttons and click on your OUTPUT wave in<br />

the waveform window.<br />

Then go to special functions, riseTime, and a dialog of options will pop up.<br />

Configure the options appropriately for Rise or Fall, and then in the output manager click<br />

GET EXPRESSION.<br />

The final string that you use should look something like<br />

"riseTime(VT("net190" "/mnt/castor.../......" ) 0 nil 5 nil 10 90 nil nil nil 1). For fall time flip<br />

the position of 5 and 0."


7<br />

Figure 3 <strong>Cadence</strong> outputs Manager Window<br />

2. D flip flop layout (30/100 pts Extra Credit)<br />

Create a mask sequence for the asynchronous resettable, static D flip-flop developed in<br />

<strong>Cadence</strong> Lab 1. Follow the standard cell design guidelines. Perform DRC and LVS on it<br />

before simulating the extracted view in Spectre. Perform PLS and make sure it works as<br />

desired. That is satisfies the functional behavior verified in your Verilog-XL simulation<br />

executed in Lab 1. Using you PLS determine the clock-to-Q delay and the reset-to-Q delay<br />

when clkin frequency = 25 MHz. Print out the mask sequence and simulation result.<br />

3. Static D flip flop setup and hold times (20/100 pts Extra Credit)<br />

Describe how you would go about using the PLS to determine the setup and hold times for<br />

your static D flip flop.<br />

Please note that this cadence Lab Assignment 1 (as well as <strong>Cadence</strong> Lab Assignment 1)<br />

will count 1.5 x the score for each of the seven Text Book Homework Assignments.<br />

KRL<br />

Updated 19 Mar 13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!