Presentation is loading. Please wait.

Presentation is loading. Please wait.

מבנה המחשב – מבוא למחשבים ספרתיים Parallel Prefix Computation.

Similar presentations


Presentation on theme: "מבנה המחשב – מבוא למחשבים ספרתיים Parallel Prefix Computation."— Presentation transcript:

1 מבנה המחשב – מבוא למחשבים ספרתיים Parallel Prefix Computation

2 The PPC Circuit

3 Fan-out of a PPC Circuit Upper Bound: There is a constant maximum number of splits per layer. There are O(log n) layers. Therefore, the total number of splits is O(log n).

4 Fan-out of a PPC circuit (2) Lower Bound: For simplicity, let us renumber the terminals beginning with 1 instead of 0. Observe that the even numbered outputs are split once just before the exit. Also observe that even numbered outputs of each circuit come from an internal circuit.

5 Fan-out of a PPC circuit (3) Let us look at the n/2 = 2 (log n)-1 output terminal. It will be an Even numbered output terminal of log(n)–2 circuits in the recursive construction.

6 1 depth Output Terminal Splitting log n -1 depth This is the n/2 th = 2 (log n)-1 output terminal of the full circuit log n - 2 depth 2 depth

7 Fan-out of a PPC circuit (4) Thus, the right most terminal will split log(n)-2 times and have a fan-out of log n - 1. Since we have shown an example that achieves the Upper Bound, the Lower Bound must be equal to the Upper Bound.

8 Operator *

9

10 PPC for Decimal Addition Reduction to carry bit computation: S[i] = mod( A[i]+B[i]+C[i], 10 ) This is a constant time reduction since the addition of 3 BCD coded decimal digits can be done in constant time. The price is linear since it is a constant price per decimal digit. The problem is reduced to the calculation of the carry bits.

11 Defining the Alphabet For i=-1: 2·C[0] = 0 or 2 For i≥0: 0 if A[i]+B[i] < 9 (kill carry) 1 if A[i]+B[i] = 9 (propagate carry) 2 if A[i]+B[i] > 9 (generate carry) σ[i] =

12 The Operator The original * operator is what we need. The meaning of the alphabet is the same as the one used in class: –0 = kill carry –1 = propagate the carry –2 = generate a carry Go through the lecture notes and convince yourselves that it works.

13 The Circuit The carry bits are calculated using the PPC circuit. We then use a BCD adder for each of the output digits: S[i]=mod(A[i],B[i],C[i],10)

14 2’s Complement Overflow

15


Download ppt "מבנה המחשב – מבוא למחשבים ספרתיים Parallel Prefix Computation."

Similar presentations


Ads by Google