Project - EE 421L
Koby sugihara,
carpiosu@unlv.nevada.edu
11/9/14
Project:
For
this years project we had to create a working ALU that could use the
and,subtract,add, & or functions. To complete the ALU I first created a 1bit ALU.
To create subtraction we need to do the 2's compliment of B because
there are no minus function in binary. So we had to create an inverter
and add it to a. ex: A+(-B). Below is my schematic for the 1 bit ALU.My
control signal is F. so 11 is the "AND" function, 10 is the "Or"
function, 01 is the Subtraction function(A-B) and 00
is the addition
function(A+B). Also note that cout bit does not matter for the and
and or gates because these gates are not using the full adder.
1bitALU schematic:
This is my symbol for the 1bit- ALU so i could use it to create my 8bit schematic.
To
create my 8bit ALU I used the 1bit alu and used busses and what we
learned previously in the last lab(lab7) when we turned 1 bit parts to
8bit. This is my 8biut schematic: Remember for the cin pin that you
have to tie the F0(select 0) into the cin then 6 cout bits are fred
intot he cin pin.(just like we did in the FA 8 bit schematic where we
had to tie the cout pins to the cin pins to connect them all together).
We did this because instead of using 2 full adders in our schematic we
only needed to use one. It killed two birds with one stone because if
you put a 1 or 0 for the F0 pin this would determine if the full adder
will do subrtraction or addition with A and B.
This is my 8bit ALU symbol:
First I simulated the Addition function (A+B). To do this i needed to set F to 00.
Since it is an 8bit ALU i needed to put 8 inputs and 8 outputs. To have
a bunch of combinations for the inputs i staggered the time delay for
the inputs. Then i connected 8 no connections for the output. My cout
is the overflow bit mainly used in addition and subtraction.
These are my inputs: remeber it goes from 0-8. So I chose to look at the 50 ns. For a I got 11111111 (255) and for b I got 11111111 (255). This is my output at 50 ns. cout is 1 and the output is 11111110(254).
So the equationis 255+255. It should be 510 but i got 254. This is
where the cout overflow bit comes into significance. With the overflow
the output becomes 111111110(510) which is correct.
Next i simulated the function "And ".
Using the same 8 inputs staggered for a and b. the only thing that was
changed was the F inputs to use the and function in the ALU.
If you look at the 0.6 us (2 ticks away from the .5) you see a is 11111110 and B is 11111110.
Then you look at the output at 0.6us. we have 11111110. 11111110 and 11111110 using the and function gives 11111110. Which is correct.Next we simulated the "OR" function. I used the same staggered inputs for A and B again and just changed the F to 10.
Lets look at the 1.1us (2 ticks away from the 1us) input. We have A= 00000011 B= 00000001
For the output we have cout =0, and z= 00000011. 00000011 or 00000001 becomes 00000011. Which is true so the or function works.
Lastly we had to test the subtraction gate. Same as above we used the staggered inputs and then changed the F to 01
If you look at 0.5 us.
A=11111111 B=11111111 When cout is 1 you can ignore it becaue it is an
overflow bit. But when the cout is 0 that means you have a negative
number and you have to take the 2s compliment of the output.
At 0.5 us the output is z=00000000 (0) is what we expect from 255-255=0. so the subtraction works.
Now
that we know that the alu works we can move on to the layout. The
process i did was create a layour for a 1bit mux,inverter,and,or and
FA. So basically 1 bit of everythign used in the 1bit alu
schematic that i showed in my first picture.
First this is my And Gate:
Next is my OR gate:
Next is my 2-1Mux:
Then my FA 1 bit that we made previously:
Next
I followed my schematic from the 1 bit and put them all onto 1 layout
creating my 1bit ALU. This is my 1bit ALU layout: In order from left to
right i used: the and ,or mux,inverter,mux ,FA, and the last mux.
This is my LVS with the schematic to make sure it works.
Now
to build the 8bit ALU i used the 1 bit ALU and instantiated it 8 times
into the new layout. The only connections you have to make inbetween
the 8 bits is the gnd,vdd,FA,F0 and F1. You have to tie all the gnds
and vdds the same which is easy. Now, you have to remember that when
you connect all the alu bits together that the FA must be connected all
together through all 8 like we did when we made the 8bit FA in lab 7.
So Looking at the schematic you use the F0 bit goes into the first cin
of the FA, then you connect the cout of the first full adder and
connect it to the cin of the next full adder and so forth. For the last
cout you leave it unconnected because in my schematic that is my
cout<7> pin.
Here is a picture of all the connections i made.
Here is a zoomed in view of connecting the FA together:
Here ar some of the connections zoomed in: ex:vdd,gnd
Then i DRC and LVS the 8 bit to make sure the layout has no errors and it matches the 8bit schematic seen above.
This is the full view of my 8bit ALU.
This concludes my project of the 8bit ALU.
Dont forget to back up your work:
i sent mine to my email.
These are my files:
Return to EE 421 Student Labs