Objectives
We will learn how to design and build mini ALU circuit (control & datapath).
Mini ALU
Design an simple ALU.
For your ALU, it must satisfy the following specifications:
- Addition (w/ overflow indication).
- Multiply by 2 (shift left w/ overflow indication).
- Divide by 2 (shift right).
- Masking.
- It takes in an 8-bit value as input (3-bit instruction set & 5-bit data).
- It gives out a 5-bit value as result of the calculations.
- There will be a 1-bit overflow indicator.
- Be able to store the output result back to an input register.
Detail Specifications for instructions
- 000 XXXXX - initialize all registers (output 0000).
- 001 aaaaa - put aaaaa value into register 1 (result hold the last output value).
- 010 bbbbb - put bbbbb value into register 2 (result hold the last output value).
- 011 XXXXX - take previous result & store into register 2 (result hold the last output value).
- 100 XXXXX - add register 1 & register 2 values (output result).
- 101 XXXXX - right shift R2 (output the result).
- 110 XXXXX - left shift R2 (output the result).
- 111 XXXXX - masking (AND-ing) R1 and R2 (output the result).
Note: You are required to use bus for this lab. (See bus tutorial). You may use existing
xilinx components (adder, muxes, etc) for this ALU design.
TA will be grading this assignment in the lab. Your grade will be based on simulation test results.
Be sure to test thoroughly your circuit before you decided to be graded. TAs will not grade your circuit
more than once.
Report
Grading
100% will based on the completeness and correctness of the simulation.
|