CSCI-2500 Computer Organization Carry-Lookahead (CLA) Adder Justin M. LaPre Department of Computer Science Rensselaer Polytechnic Institute 110 8th Street Troy, New York U.S.A. 12180 March 14, 2016 1 Equation Dependencies for 64 Bit CLA Recall that we can express the sum of two numbers as: � � = sum i a i b i c i − 1 (1) Also, we know that: = g i + p i c i − 1 c i (2) where g i is the generate function which says did we generate a carry in the i th stage and the p i is the propagate function which says did we propagate a carry in the i th stage assuming the carry-in, c i − 1 , was positive. This yields the following: = g i a i × b i (3) = a i + b i p i (4) = g i + p i c i − 1 c i (5) Now, using the above recurrence we can find what c i is for any 4 bit block or group . 1
c i = g i + p i c i − 1 (6) = g i +1 + p i +1 c i c i +1 (7) = g i +2 + p i +2 c i +1 c i +2 (8) = g i +3 + p i +3 c i +2 c i +3 (9) Notice how each of the c i equations can all be written in terms of the the g , p and c i − 1 . But, c i − 1 is really the carry-in for this group of 4 bits. So, this means that the carry-in to those groups depends on the gc equations, which are: = gg j + gp j gc j − 1 gc j (10) = gg j +1 + gp j +1 gc j gc j +1 (11) = gg j +2 + gp j +2 gc j +1 gc j +2 (12) = gg j +3 + gp j +3 gc j +2 gc j +3 (13) (14) where... = g i +3 + p i +3 g i +2 + p i +3 p i +2 g i +1 + p i +3 p i +2 p i +1 g i gg j (15) gp j = p i +3 p i +2 p i +1 p i (16) Again, notice how each of the gc j equations can all be written in terms of the the gg , gp and gc j − 1 . But, gc j − 1 is really the carry-in for this section of 4 groups. So, this means that the carry-in to those sections depends on the sc equations, which are: sc k = sg k + sp k sc k − 1 (17) = sg k +1 + sp k +1 sc k sc k +1 (18) = sg k +2 + sp k +2 sc k +1 sc k +2 (19) = sg k +3 + sp k +3 sc k +2 sc k +3 (20) (21) where... sg k = gg j +3 + gp j +3 gg j +2 + gp j +3 gp j +2 gg j +1 + gp j +3 gp j +2 gp j +1 gg j (22) sp k = gp j +3 gp j +2 gp j +1 gp j (23) 2
2 Steps for Calculation for 64 Bit CLA 1. Calculate g i and p i for all i . (1 gate delay) 2. Calculate gg j and gp j for all j using g i and p i . (2 gate delays) 3. Calculate sg k and sp k for all k using gg j and gp j . (2 gate delays) Note, it is at this point, we can shift to computing the top-level sectional carries. This is because the number of sections is less than or equal the block size which is 4 bits. 4. Calculate sc k using sg k and sp k for all k and 0 for sc i − 1 . (2 gate delays) 5. Calculate gc j using gg j , gp j and correct sc k , k = ( j div 4) as sectional carry-in for all j . (2 gate delays) 6. Calculate c i using g i , p i and correct gc j , j = ( i div 4) as group carry-in for all i . (2 gate delays) � b i � c i for all i . (2 gate delays) 7. Calculate sum i using a i 8. Total gate delays for 64 bit CLA is 13. 3
Recommend
More recommend