Project - EE 421L 

Authored by Nha Tran

Email: trann4@unlv.nevada.edu

NHSE ID: 2000590233

08/24/2014 

  


I start with a basic requirement for the project which is designing an ALU that can perform AND, OR, add, and subtract. Reading the gates from bottom up you can see that i place a Full-Adder(FA), AND, OR, and a FA with a inverter attached to B input. Next, all the output will go to two 2to1MUX that will select either a 1 or 0, and both of those MUXes will go to another 2to1MUX that will perfrom the same operation.

proj_nt04.PNG

       

Below is a symbol that i created for the 8-bit ALU that has 2 8bit input A and B, one 8bit output Z, and 2 selector F1 and F2.

proj_nt03.PNG

     
Reading from the first image you can see that when
F1F2
AND00
OR01
add10
subtract11
   

for testing the function of the ALU i  inputted a 5V pulse for F1 and F2 with different period, my A is 0000 1110, and B is 0000 0101

proj_nt02.PNG

   

the result of my input A and B should be as followed

OperationOutput (Z)
00A AND B0000 0100
01A OR B0000 1111
10A + B0001 0011
11A - B0000 1001
   
As was expected the simulation result matches the theoretical data.   

proj_nt01.PNG

    

However for sanity check i will use a different input to see if it works for all values of A and B. this time however A will be 1001 1101 and B will be 0110 1001. The output should be as followed. 

OperationZ
00A AND B0000 1001
01A OR B1011 1101
10A + B1100 0110
11A - B0111 0100
     
This simulation also matches the theoretical so i know that the ALU works.        

proj_nt06.PNG

     

The schematic of the AND, OR, FA, and MUX was designed in previous labs so i will not go into details of it or how it works. The only one that was not covered in previous labs is the subtractor using a FA. Below is the image of a subtractor. Its operation is simple to understand, because the CPU cannot understand subtraction the way a human brain can, we have to program it to do subtraction via 2s-complement. 2s-complement is easy to understand with no deep thought, if we have A-B, all we need to do is invert B and add 1, then add to A. As you can see from below. B is inverted and Ci is a constant vdd which is 1. The addition of A + B-inverse + vdd(1) will give you A-B. The Cout is left as a No-Connection in this case because we are only doing A-B where B<A. However we can adjust it easily if we want, in case where B>A, then the Cout will be 0 which indicate that is it a negative number, and when B<A Cout will be 1 which is a positive number. 

proj_nt05.PNG

     

Next i will start laying out each individual elements in the ALU then make a 1 bit ALU. Note that in previous labs the schematic of the element was drafted but not the layout. First up is the layout of a AND gate. 

proj_nt07.PNG

     

Next is the layout of the OR gate.

proj_nt08.PNG

    

Next up is the 2to1MUX

proj_nt09.PNG

     

Lastly is the FA which i made in previous lab but it was too messy so i adjusted some metal to make it cleaner
proj_nt10.PNG
     
With all the elements in the ALU made with no DRC error and matching LVS, lets put it all together to make a 1bit ALU. below is a schematic of the 1bit ALU
proj_nt11.PNG
     

I made my ALU to mirror my schematic reading from top to bottom. The left most of my ALU is the subtractor, then the OR gate, and both connected to the MUX. Next is the AND gate then the FA both of which is connected to the second MUX, then the two previous MUX will connect to a third MUX. As seen below in the layout. I did a stretch of all the layout of the AND, OR, INV, and MUX to match the height of my FA. At first, my idea was to make all the vertical connection on metal2 and all horizontal connection on metal1 that way it would look cleaner. but somewhere along the process i just mix them up. 

proj_nt12.PNG

     
After my 1bit ALU DRC and matches my schematic it was smooth sailing when making my 8bit ALU. the only different between the 1bit and 8bit ALU was that i had to tie all my F1 selector together, and do the same for the F2 selector. Then i connected my Cin of my subtractor to vdd, Cin of FA to gnd. Then connect my cout of A<0> to cin of A<1>, cout of A<1> to cin of A<2>, etc. and the last cout of both the FA and the subtractor has no connection. Below is the layout of the 8bit ALU. This layout has the dimension 254X397.

proj_nt13.PNG

   

below is the image that it LVS

   

Capture.PNG

    

The above layout was actually my second layout, my first layout (image below) is aesthetically better but functionally not so good because there is a big gap in the middle which i put my name and UNLV in it to fill up the gap. But for grading purposethe first one should be graded not the one below. The one below can be use as reference for future students taking Dr. Baker's design class for what not to do.

proj_nt14.PNG

    

Lastly, zipping up the design folder and emailing it to myself as a backup. 

proj_nt15.PNG

     
And here is the file projlab_nt_f14.zip that all the work that was done.

     

Return to EE 421L labs