MIPS ALU, Carry Lookahead Addition
Tom Kelliher, CS 240
Feb. 19, 1999
Building an ALU.
- MIPS ALU.
- Carry lookahead addition.
Constant time addition with alternative number systems.
What additional functionality needed?
- Subtraction.
- slt instruction.
- beq/ bne comparison.
- Overflow detection.
- Complementing the b input: additional control signal.
- Adding the 1.
-
result = (a - b) < 0
- Additional mux input to one bit ALU.
- Need adder output from msb; wraparound to lsb position.
Need signal to indicate that result equals 0.
Inputs: operation, signs of a, b, result.
Why carry-out in Figure 4.17?
Three input lines:
- Subtract b.
- Mux select: two lines.
- Eight possibilities, five used: and, or, add, subtract, set on less
than.
- Why bother with speeding up addition?
- Divide and conquer approach to addition: ,
where .
- Can we pre-compute the carries?
- Carry generate: .
- Carry propagate: .
- Illustration: look at p, g, and c for 11010101 and 01110011.
- Some carry equations:
-
-
-
- A bit of recursion:
- Base case:
- Recursive step:
- Why this isn't feasible. The Winograd lower bound.
The big picture. Restricting the carry computation circuitry to a tree
structure:
What does this buy us?
- Design a 4-bit full carry lookahead adder.
Block diagram:
Block generate, propagate.
- What is the fan-in?
- What is the delay model from inputs to outputs?
- Design a 4-Group carry lookahead unit.
Block diagram:
Use of block generates, propagates.
- What is the fan-in?
- What is the delay model from inputs to outputs?
Cascaded and full carry lookahead.
Cascaded and full carry lookahead.
Thomas P. Kelliher
Thu Feb 18 12:43:50 EST 1999
Tom Kelliher