Draw out how the following code is run step-by-step with freezing. What is the CPI? Use t attach line paper. (10 pts)
ADD R1, R2, R3
ADD R4, R5, R6 LW R7, +4(R1)
SW +8(R4), R7
XOR R2, R7, R8
AND R3, R2, R7
2. Draw out how the following code is run step-by-step with forwarding. What is the Cr the attach line paper (10 pts)
LW R1, +0(RS)
LW R2, +4(R5)
ADD R3, R1, RZ ADD R4, R3, R2 LW R5, +0(R4)
XOR R7, R4, R5
3. What is the CPI for pipeline with the following conditions? Using Forwarding (10
Hazard type
%
Jumps
30
Branches (Taken)
10
RAW (combined load-alu, load-store)
20