midterm_solution_sp03

midterm_solution_sp03 - Here's a solution to the midterm...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Here's a solution to the midterm with some of the questions summarized: 1. Lookahead adder design a) G''(3) = G'(12) * P'(13) * P'(14) * P'(15) + G'(13) * P'(14) * P'(15) + G'(14) * P'(15) + G'(15) P''(2) = P'(11) * P'(10) * P'(9) * P'(8) C(20) = G''(4) + P''(4) * C16 C(32) = G'''(1) + P'''(1) * G'''(0) + P'''(1) * P'''(0) * C0 C3 = G'(2) + P'(2) * G'(1) + P'(2) * P'(1) * G'(0) + P'(2) * P'(1) * P'(0) * C0 b) Design the lookahead and addition logic for a incrementer. The B input and the generates are zero and C0 = 1. carry-lookahead block: C1 = C0 * p0 C2 = C0 * p1 * p0 C3 = C0 * p2 * p1 * p0 P = p3 * p2 * p1 * p0 adder: sum = a XOR c p = a c) Assume that each gate delay is t time units, and all gates are available with up to 4 inputs. How much faster than the adder would the incrementer be? Assuming XOR gates with delay t: Adder: C48 is ready at t (P' and G') + 2t (P'' and G'') + 2t (P''' and G''') + 2t (carry) = 7t C63 is ready at 7t + 2t + 2t = 11t Sum63 is ready at 11t + 2t = 13t Incrementer: (assuming first-level propogates are ready at time = t) C48 is ready at 0 (P') + t (P'') + t (P''') + t (carry) = 3t C63 is ready at 3t + t + t = 5t Sum63 is ready at 5t + 2t = 7t 2. System performance question. The base system spends 82% of the time computing and 18% of the time waiting for the disk. Integer instructions (40% of executed instructions) have a CPI of 1, floating- point instructions (30%) have a CPI of 5, and other instructions (30%) have a CPI of 2. i. a) The processor is replaced with one that reduces computation time by 35%. Speedup = 1 / ((1 - 0.82) + 0.82 * 0.65) = 1.40 b) The disk is replaced with one that reduces disk wait time by 85%. Speedup = 1 / ((1 - 0.18) + 0.18 * 0.15) = 1.18
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
c) The floating-point CPI is changed to 3. Average CPI (old) = 0.40 * 1 + 0.30 * 5 + 0.30 * 2 = 2.5 Average CPI (enhanced) = 0.40 * 1 + 0.30 * 3 + 0.30 * 2 = 1.9 Speedup (computation) = 2.5 / 1.9 = 1.316 Speedup = 1 / ((1 - 0.82) + 0.82 / 1.316) = 1.245 ii. Part a results in the best speedup iii. If the disk was infinitely fast: speedup = 1 / (1 - 0.18) = 1.22 <= still slower than part a If the floating-point computation was infinitely fast: Average CPI (old) = 2.5 (from part i) Average CPI (enhanced) = 0.40 * 1 + 0.30 * 0 + 0.30 * 2 = 1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This test prep was uploaded on 03/29/2008 for the course ECE 552 taught by Professor Wood during the Spring '05 term at Wisconsin.

Page1 / 5

midterm_solution_sp03 - Here's a solution to the midterm...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online