Final Project Report 4-Bit ALU Design: Kai Zhao Aswin Gonzalez Sepideh Roghanchi Soroush Khaleghi
Final Project Report 4-Bit ALU Design: Kai Zhao Aswin Gonzalez Sepideh Roghanchi Soroush Khaleghi
Kai Zhao
Aswin Gonzalez
Sepideh Roghanchi
Soroush Khaleghi
Part 1) Final ALU Design:
Figure 1 shows the final schematic of the ALU. There are 3 additional functionalities that we have used to design the
final ALU:
3to6 Decoder: This block will select one of the 6 main units based on the operation code.
4x2-bit AND (AKA 5-bit AND in our project files): There are six 4x2-bit AND blocks, one for each main
function. It has 5-bit input, consisting of four 2-bit AND gates inside. The 4 outputs of each unit are
connected to 4 inputs of the 4 AND gates. The last input comes from the decoder an is connected to
every AND gate to select the signal of the ALU. If one unit is selected, then the output of the 5-bit AND
unit matches the output of the selected unit. The outputs of other units the 5-bit AND units will be
silenced to zero.
6-1_or: There exist 4 instances of this gate, each for one of the final outputs. There are 6 inputs to each
OR gate, coming from the six 5-bit AND blocks. For example, the (least significant bit) LSB of each 5-bit
AND is connected to the inputs of the first 6-1_or gate to compute the final LSB.
Basically, we have used the above additional blocks to implement a 4-bit 6:1 MUX (needed for selecting the desired
unit and propagating its outputs to primary outputs of the design) at a smaller hardware cost.
Figure 1: Final Schematic of the ALU
Figure 2 shows the final layout of the ALU.
For each test vector, we first show the corresponding truth table. Then, we will show the schematic of the setup and
finally the simulations results.
Note: We have simulated every block with all possible input combinations separately as well. The results will be
shown in the next section.
In the above graph, IN2, IN1, and IN0 are the opcodes (from MSB to LSB). OUT3, OUT2, OUT1, OUT0 are representing
the final outputs (from MSB to LSB). As it can be seen from some sample calculations on the figure, all the truth table
results match the simulation results.
Second Test Vector Truth Table:
A[3:0] B[3:0] opCode Output[3:0] Operation
1111 0110 000 0101 Addition
1111 0110 001 0001 2’s Complement
1111 0110 010 1001 Addtraction
1111 0110 011 0000 NAND
1111 0110 100 0000 NOR
1111 0110 101 1001 1’s Complement
1111 0110 110 0000 Not defined
1111 0110 111 0000 Not defined
We fix A3-0 to be all 1’s to check the correctness of the NAND gate, when the output is 0. We also fixed it to be 0 to
check that the NOR gate correctly outputs 1.
Now that we have verified the correctness of the ALU, we will show the schematic, test, and layout of every
component in the final design. We will test every component with all possible op code.
Part 2) Main Units Design:
Figure 15: Schematic and the Extracted views of the 1's Complement block
The figure below shows the simulation results of the 1’s complement block. Basically, each input must be inverted to
get the corresponding output.
Figure 19: XOR gate implementation using NAND gates Figure 17: Half adder
Schematics:
Shown first of every component.
Simulation:
Shown last of every component.
DRC Pass:
Showing LVS pass is enough to show DRC pass because DRC pass is required for etracting, which is required
for LVS pass.
LVS Pass:
Shown middle of every component along with the layout.
Post-layout Simulation:
Shown for the ALU, which demonstrates the functionality of various functions while meeting time constraints.
Part 5) Final Project Naming Conventions
There is a lack of naming conventions because multiple people worked on designing an building this ALU. Listed
below is the component’s cell name for every component of the ALU in the order it appears in this report so
spectators will know the reference of each cell.