Lab Project - ECE 421L

Design, layout and simulate an 8-bit ALU that can perform A OR B, A ANDB, A+B and A-B

Prepared by:

Jason Sikorski

sikorsk4@unlv.nevada.edu

November 24, 2014

  

Part 1: Design and simulate

 

For this lab we will be using the logic gates designed in lab 7 to design an 8-bit ALU. The ALU will have 3 inputs (A, B, F) and 1 output (Z). The ALU will perform the desired operation based on the given F input.

 

F0

F1

Operation

0

0

A + B

0

1

A - B

1

0

A OR B

1

1

A AND B

 

LAB WORK:

 

The first operation needed to be performed is our OR function. For this we took our 2 bit NOR gate, added an inverter onto the end and cascaded it into an 8 bit OR gate.

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig1.pngFig 1

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig2.pngFig 2

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig3.pngFig 3

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig4.pngFig 4

 

The second operation needed to be performed is our AND function. For this we took our 2 bit NAND gate, added an inverter just as we did in the previous step and then cascaded it into an 8 bit AND gate.

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig5.pngFig 5

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig6.pngFig 6

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig7.pngFig 7

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig4.pngFig 4

 

The third operation needed to be performed is our 8bit ADD function. To perform this we used the 8 bit full adder we designed for lab 7.

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig8.pngFig 8

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig9.pngFig 9

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig10.pngFig 10

 

The final operation needed to be performed is the 8bit SUBTRACTION function. To perform this we used the same 8 bit full adder as the add function. To get the adder to perform subtraction instead of addition, we used an 8 bit XOR gate to invert our B input and our carry in signals. To perform the inversion we used our F1 input. When F1 is 0 there is no inversion and addition is performed. When F1 is 1 the inversion is performed and the adder adds the 2's compliment of the B input, thus giving the subtraction solution. For this the following XOR gate was used

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig11.pngFig 11

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig12.pngFig 12

 

In order to get the desired output from our selection we used an 8 bit Multiplexer. The multiplexer could not be cascaded in the way the logic gates were due to the single S input.

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig13.pngFig 13

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig14.pngFig 14

 

This led to the following overall design schematic and symbol of the ALU:

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig15.pngFig 15

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig16.pngFig 16

 

To ensure the ALU performed as intended 2 different inputs were simulated, for the first the following values were used:

A

B

ADD

SUB

OR

AND

00001100 (12)

00000101 (5)

00010001 (17)

00000111 (7)

00001101

00000100

 

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig17.pngFig 17

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig18.pngFig 18

 

For the second simulation the following values were used:

A

B

ADD

SUB

OR

AND

00011100 (28)

00010100 (20)

00110000  (48)

00001000 (8)

00011100

00010100

 

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig19.pngFig 19

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig20.pngFig 20

 

This completes the first part of the ALU design


Part 2: Layout, DRC & LVS


For part two we will layout the schematics designed in part 1, starting with the 2 bit OR gate


http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig21.png
Fig 21
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig22.png
Fig 22
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig23.png
Fig 23
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig24.png
Fig 24

 The next piece to layout is the 2 bit AND gate



http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig25.png
Fig 25
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig26.png
Fig 26
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig27.png
Fig 27
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig28.png
Fig 28


Now that the AND and OR functions are complete the 2 bit Full Adder needs to be laid out, although this piece was laid out for Lab 7, it will be refined to better fit into the overall design of the 8 bit ALU


http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig29.png
Fig 29
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig30.png
Fig 30
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig31.png
Fig 31


As mentioned in part 1, a 2 bit XOR gate is needed to perform the subtraction function. As with the layout for the Full Adder, this one was also done previously in Lab 6 and will simply need to be refined.


http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig32.png
Fig 32
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig33.png
Fig 33
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig34.png
Fig 34


The final component of the ALU to be laid out is the 2 bit Multiplexer, again refined from the layout done in Lab 7


http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig35.png
Fig 35
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig36.png
Fig 36
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig37.png
Fig 37


Now that all the components have been laid out we can work on the layout for the 8 bit ALU. During the layout of each component special care was given to ensure the space between vdd! and gnd! was equal. This will allow us to align each piece and implement a global gnd and vdd. The gnd and vdd were also extended on the sides of each layout to help facilitate this. For the 8 bit ALU we will start by laying out a 1 bit ALU that can be cascaded together to form the complete 8 bit layout.



http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig38.png
Fig 38
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig40.png
Fig 40
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig39.png
Fig 39


Since there is no 1 bit ALU schematic to compare our layout to we can not perform an LVS. Now that the 1 bit ALU is complete we can cascade 8 of them and run all the necessary connections.


http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig41.png
Fig 41
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig43.png
Fig 43
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig42.png
Fig 42
http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig44.png
Fig 44

By having the 1 bit ALU share the same gnd and having a vdd on top and bottom I was able to cascade each piece into a 2x4 array and then just connect the 3 vdd runs on the left and the 2 gnd runs on the right. All inputs are on metal 1. The metal 3 layer was not used, this will allow all off chip inputs and outputs to utilize this layer without restriction. The final layout measures 181.5 um by 463.2 um. This completes both parts of the lab project.


The folder is backed up and zipped.

http://cmosedu.com/jbaker/courses/ee421L/f14/students/sikorsk4/Proj/Images/Fig45.png
Fig 45



Download proj_jms_fa14

 

Return to EE 421L Labs