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.
Remark: This material is (in the 3e) in Appendix C, section C.2.
How many entries do we have now in the truth table?
don't carebits.
Some simplifications we can take advantage of.
opcode | ALUOp | operation | funct | ALU action | ALU cntl |
---|---|---|---|---|---|
LW | 00 | load word | xxxxxx | add | 0010 |
SW | 00 | store word | xxxxxx | add | 0010 |
BEQ | 01 | branch equal | xxxxxx | subtract | 0110 |
R-type | 10 | add | 100000 | add | 0010 |
R-type | 10 | subtract | 100010 | subtract | 0110 |
R-type | 10 | AND | 100100 | and | 0000 |
R-type | 10 | OR | 100101 | or | 0001 |
R-type | 10 | SLT | 101010 | set on less than | 0111 |
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