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:
- 4-bit addition.
- multiply by 2 and divide by 2 (shift left/right registers).
- 4-bit comparator outputing the smaller value.
- It must have 2 4-bit registers that hold values for the calculator.
- It takes in an 7-bit value as input (3-bit instruction set & 4-bit data).
- It gives out a 4-bit value as result of the calculations.
- There will be a 5-bit output value (1-bit to indicate overflow).
Detail Specifications for instructions
- 000 XXXX - initialize all registers (output 0000).
- 001 XXXX - put XXXX value into register 1.
- 010 XXXX - put XXXX value into register 2.
- 011 XXXX - take previous result & store into register 2.
- 100 XXXX - add register 1 & register 2 values (output result).
- 101 XXXX - multiply register 2 value by 2 (output result).
- 110 XXXX - divide register 2 value by 2 (output result).
- 111 XXXX - comparator (output the smaller value of the two).
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 lab for you in the lab. Your grade will be based on
simulation test results & a design question relating to this lab.
TA Verification: ______________________________________
(note, TA will record your simulation result for grade).
Date & Time: ______________________________________
Report
Grading
100% will based on the completeness and correctness of the simulation.
|