Computer Architecture

Start Lecture #15

Remark: Typo in lecture #13. There are four (not three) ALU control lines; we will use only three since we are not doing NOR.

Remark: Review answers for Midterm.

Controlling the ALU Given the Summary

Remark: This material is (in the 3e) in Appendix C, section C.2.

How many entries do we have now in the truth table?

Some simplifications we can take advantage of.
opcodeALUOpoperationfunctALU actionALU cntl
LW00load wordxxxxxxadd0010
SW00store wordxxxxxxadd0010
BEQ01branch equalxxxxxxsubtract0110
R-type10add100000add0010
R-type10subtract100010subtract0110
R-type10AND100100and0000
R-type10OR100101or0001
R-type10SLT101010set on less than0111

Applying these simplifications yields

    ALUOp | Funct        ||  Bnegate:OP
    1 0   | 5 4 3 2 1 0  ||  B OP
    ------+--------------++------------
    0 0   | x x x x x x  ||  0 10
    x 1   | x x x x x x  ||  1 10
    1 x   | x x 0 0 0 0  ||  0 10
    1 x   | x x 0 0 1 0  ||  1 10
    1 x   | x x 0 1 0 0  ||  0 00
    1 x   | x x 0 1 0 1  ||  0 01
    1 x   | x x 1 0 1 0  ||  1 11