Chapter 6 (pp.282-313) and Chapter 7 (pp. 329-337) of the Katz text.
The ALU has 3 control signals that specify 1 of 8 functions. The data
input signals should be labelled a[7:0] and b[7:0] (with a[7] and b[7]
being the high-order bits), the data output signals should be labelled
c[7:0], the control input signals should be labelled s[2:0], there are
four other outputs: carry-out, equal-to-zero, overflow, and
less-than-zero. These last three outputs are simple combinational
functions.
Control Function Comment
[s2,s1,s0]
---------------------------------------------------------
000 C = 0 zero
001 C = A pass A
010 C = B pass B
011 C = A xor B bit-wise XOR of A and B
100 C = A + 1 increment A
101 C = A - 1 decrement A
110 C = A + B add A and B
111 C = A - B subtract B from A
The carry-out and overflow should be valid for all arithmetic operations.
Equal-to-zero and less-than-zero should be valid after all operations.
Turn in schematic file and simulation waveforms for the following
cases:
Operation A B
----------------------------------------------
000 1 2
001 -128 65
010 5 10
011 15 30
100 79 65
101 0 1
110 -1 1
111 7 8