Lab 7 - ECE 421L 

Authored by, Vincent Ibanez

Email: ibanez.troy.e@gmail.com

Today's date 10/19/2014

  


PreLab:   

Tutorial 5 – Design, layout, and simulation of a ring oscillator

 

In this tutorial we designed, layout, and simulated the operation of a ring oscillator.

One of the goals of this tutorial is to teach how to use arrays and buses

 

Copy the library, Tutorial_4, into a new library called Tutorial_5.

Ensure, when you copy, that “update instances” is selected so that the new library doesn’t reference cells in the other libraries.

As always, put the new library in $HOME/CMOSedu

 

Create a new schematic cell view called ring_osc.

In this cell view place the inverter symbol that was created in tutorial 3.

Also place the vdd supply net symbol, see below.

 

1.PNG

 

Next press c (for copy) and the inverter (to copy the inverter).

 

2.png

 

Before placing the copy of the inverter press F3 (special options).

We’ll make a 31 stage ring oscillator so select 30 columns as seen below (to add 30 inverters to the existing one).

 

3.png

 

Instantiate the (first copied) inverter on the output of the existing inverter.

Repeat for the second copied inverter to get the following.

Note that if we wanted a wire between the inverters we could have added the wire on the output of the first inverter and then copy both the inverter and wire.

 

4.PNG

 

Add a wire connecting the output of the last inverter to the input of the first inverter.

5.PNG

 

Label the wire osc_out as seen below.

Check and Save the schematic.


6.PNG

 

Now start the ADE.

Set the MOSFET models (Setup -> Model Libraries).

Set the vdd! to 5 V (Setup -> Stimuli), or add a vdc (but not both as discussed in Tutorial_3), 

 

7.PNG

   

Select the outputs to plot (select osc_out)

Set the analysis to a transient with a length of 200 ns.

8.PNG

 

Save the State (Cellview) and “Netlist and Run” the simulation.

 

 

The output is steady at 2.5V!

9.PNG

In a real circuit noise would kick-start the oscillations.

Let’s do this in the simulation by adding an initial condition.

 

10.png

 

Select a node voltage of 0 and click on the wire labeled osc_out results in what is seen below (you may have to access the menu again to view this condition).

Save the state of the simulation.

 

11.PNG

 

After saving the state and simulating again we get

 

12.PNG

 

which is what we expect a ring oscillator to do ;-)

 

Save the state and close the ADE.

 

Let’s make the schematic more pleasant to look at.

Delete all of the inverters and the wires except for the first inverter.

Change the inverters name from I0 to I0<1:31> (an array of 31) and display the name (value).

 

13.PNG

 

Now use the wide wire (W) to connect to the input and output of the symbol.

 

14.PNG

 

Use the wire label (l) to add names as seen below.

 

15.PNG

 

The input of I0<1> is osc_out and its output is out<1>

The input of I0<2> is out<1> and its output is out<2>

The input of I0<3> is out<2> and its output is out<3>

The input of I0<31> is out<30> and its output is osc_out

 

The schematic is exactly the same as the one we drew earlier but clearly nicer to look at (more concise).

Re-simulating this ring oscillator gives the exact same results as seen above.

 

Save and close all cell views.

 

Create layout view for the ring oscillator and place two inverter layouts in the cell next to each other.

DRC the layout.

 

16.PNG

 

Add rectangles of metal between vdd!, Ai of the first inverter and A of the second inverter, and gnd! as seen below (where e was pressed

and the stop display level was set to 0 to hide the layout of the inverter).

DRC the layout.

 

17.PNG

 

Set the stop display level back to 10 and delete the right inverter.

 

18.PNG

 

Next select press c (to copy) and select the entire layout.

Press F3, special options, and set the number of columns to 30 (as was done above).

 

19.PNG

 

Place the inverters end-to-end as seen below.

DRC the layout

 

20.PNG

 

Next add m2_m1 vias at the left and right of the layout as seen below.

 

21.PNG

22.PNG

23.PNG

 

 

Next add a rectangle on metal2 connecting these two vias.

Below is the result where the stop display level is set to 0.

DRC the layout.

 

24.PNG

 

Add pins for gnd!, vdd! (both have a direction of inputOutput), and osc_out (set the direction to output).

Put vdd! and gnd! pins on the metal1 layer and osc_out on the metal2 layer.

 

 

25.PNG

 

DRC the layout.

Run extraction on the layout.

Save and close the layout view.

Open the extracted view and run an LVS.

26.PNG

 

The LVS fails.

 

27.PNG

 

Why? Looking at the information in si.out file above we see that terminals are not matched.

We used a pin for osc_out in the layout but not in the schematic.

Let’s add a pin to the schematic (and then Check and Save).

Make sure that the pin’s direction is output (so it matches the layout).

Also note that the wire connection between the pin and the bus (wide wire) must be labeled as seen.

 

28.PNG

 

Check and Save the schematic.

Close the schematic and open the ring_oscillator’s extracted view.

Run the LVS to see that the layout and schematic match.

 

29.PNG

 

It’s useful to compare the simulation results of both a layout and a schematic.

 

Delete the vdd symbol in the ring oscillator schematic.

 

30.PNG

 

Create a symbol for the ring oscillator.

 

31.PNG

 

Save and close all cell views.

 

Create a new schematic cell view call sim_ring_osc.

Please the ring_osc and vdd symbols in this cell.

Add a wire to the output of the ring_osc symbol labeled osc_out as seen below.

Check and Save the schematic.

 

32.PNG

 

We get two warnings (floating net/wire)

Use Check -> Find Markers then press ignore twice and close the window.

Check and Save again to verify no warnings/errors.

 

Launch the ADE and enter the models, stimuli, outputs to plot, etc. as we did above.

Don’t forget to set the osc_out to have an initial condition of 0.

When finished save the state.

Netlist and Run (hit the green button) to see the following.

 

33.PNG

 

Let’s simulate the extracted view.

As before use Setup -> Environment to enter extracted before schematic.

 

34.PNG

 

To get the following results.

 

35.PNG

 

Just to verify that we are actually using the extracted cell view use Simulations -> Netlist -> Display

 

36.PNG

 

Save and close everything.

Remember that if you save the simulation state with extracted before schematic (above) changes to the schematic won’t appear in the simulation results.

Rather Spectre will continue to simulate the extracted view. To fix this simply remove extracted above.

 

Save and close everything. This concludes Tutorial 4.


Main Lab:
  

In this lab we made an equivalent, more concise, schematic by instantiating an inverter and naming the inverter using an arrayed name (I0<3:0> see image below). 

Connect a wide-wire (bus) as seen below and connect it to input and output pins.

Name the pins as seen below. 

This schematic equivalent to the one seen above but obviously more concise.

  

37.PNG

 
Create a symbol for the schematic. 
  

38.PNG

    
Using this symbol we create a simulation schematic below.  
All four inverters' inputs are tied together to an input pulse source.

The out<0> is not connected to a load while out<3> is connected to a 100fF load.

The out<1> is connected to a 1 pF load while out<2> is connected to a 500 fF load.

  

39.PNG

  

Simulating this schematic results in the following.

Note that the capacitive load influences the delay and rise/fall times. The bigger the capacitor is, the longer that delay time will be.

 

40.PNG

  

Next, we create bit operations for several different kinds of gates. We then create a symbol for each.


NAND Schematic

NANDSchem.PNG

 

NAND Symbol

NANDSym.PNG

     

NOR Schematic

NORSchem.PNG

   

NOR Symbol

NORsym.PNG

     

AND Schematic

ANDSchem.PNG

   

AND Symbol

ANDsym.PNG

   

inverter Schematic

INVschem.PNG

 

inverter Symbol

INVsym.PNG

   

OR Schematic

ORschem.PNG

 

OR Symbol

ORsym.PNG

Next, we create 8-bit input/output array equivalents for several different kinds of gates. We then create a symbol for each. And finally, design a simulation circuit and simulate that gates that we've created.

8 NAND Schematic

8NANDSchem.PNG

   

8 NAND Symbol

8NANDSym.PNG

   

8 NAND Simulation Schematic

8NANDsim.PNG

     

8 NAND Simulation Waveforms

8NANDwav.PNG

   

8 NOR Schematic

8NORSchem.PNG

   

8 NOR Symbol

8NORSym.PNG

   

NOR Simulation Schematic

8NORsim.PNG

     

NOR Simulation Waveforms

8NORwav.PNG

   

8 AND Schematic

8ANDSchem.PNG

     

8 AND Symbol

8ANDSym.PNG

   

AND Simulation Schematic

8ANDsim.PNG

     

AND Simulation Waveforms

8ANDwav.PNG

   

8 inverter Schematic

8INVSchem.PNG

   

8 inverter Symbol

8INVSym.PNG

     

inverter Simulation Schematic

8INVsim.PNG

   

inverter Simulation Waveforms

8INVwav.PNG

   

8 OR Schematic

8ORSchem.PNG

   
8 OR
Symbol
8ORSym.PNG

   

OR Simulation Schematic

8ORsim.PNG

   

OR Simulation Waveforms

8ORwav.PNG

Note that in the results of simulation of all the gates, we have verified that the operations are correct. Also, we have verified that the bigger the capcitive load will be, the longer the delay will be and cause undesirable behavior in the operation of the gates.


Next examine the following schematic.
This is the schematic of a 2-to-1 DEMUX/MUX (and the symbol).

MUXSchem.PNGMUXsym.PNG

   

We simulated the operation of the DEMUX/MUX by connecting two different inputs A and B and by switching the select line

muxsimschem.PNG

   

Note that the reuslts of the simulation showed the output of the multiplexer switching from A to B as the select line switches from HI to LOW

muxsim.PNG

   

We can also use the multiplexer as a demultiplexer by swtiching the direction of its input and output pins. We have created a symbol for the DEMUX seen below.


demuxschem.PNG demuxsym.PNG

 

We verify that the demultiplexer is working by the simulation circuit below. Note that input Z is being redirected into output A and B by the Select line

demuxsimschem.PNG

   

Resulting waveform from the simulation shows that the demultiplexer is operating as it should

demuxsim.PNG    

Next we extend the mux/demux into an 8-bit wide word 2-to-1 DEMUX/MUX schematic and symbol.
Note that we included an inverter in your design so the cell only needs one select input, S (the complement, Si, is generated using an inverter).

8MuxSchem.PNG8muxsym.PNG

From the simulation below it can be seen that the multiplxer is operating as it should. Notice inputs A and B are switched at the middle of the waveform.

8bitmuxwav.PNG

   

Finally, we draft the schematic of the full-adder seen in Fig. 12.20 using 6u/0.6u devices (both PMOS and NMOS). 

FASchem1.PNG

FASchem2.PNG

   

We created an adder symbol for this circuit (see the symbol used in lab6).

FAsym.PNG

Next we verified the results through simulation. Note that the FA is working as it should

FAsim.PNG

   

We then extend the bit FA into an 8-bit adder schematic and symbol.
For how to label the bus so the carry out of one full-adder goes to the carry in of another full-adder we reviewed the ring oscillator schematic discussed in Cadence Tutorial 5.

8FAschem.PNG8FAsym.PNG

   

Finally we simulate the operation of the 8-bit adder by setting the input vector waveform as its inputs. In order to do this, we have followed the document seen here.

8FAinputvec.PNG

   

 

Results of the simulation below have verified that the 8bit Full Adder is working as expected

8FAsim.PNG

   

We then lay out this 8-bit adder cell (*note* that this is the only layout required in this lab).

but first we layout our single bit full adder
FAlayout.PNG
     
Then we layout our 8 bit full adder (DRC passed)

8bitFALayoutDRC.PNG
   
Lastly, we LVS the layout to ensure that it passed.

8bitFALayoutLVS.PNG

This ends lab 7. We've covered all of the basic building blocks used in an ALU.
   

   

Finally, we backed up our design lab7vi.zip directory and other files for future study.



Return to labs