Question: MOV R 0 , # 0 / / i = 0 MOV R 1 , # 0 / / sum = 0 MOV R 2

MOV R0, #0// i =0
MOV R1, #0// sum =0
MOV R2, #10// numberOfLoops =10
LOOP:
CMP R2, R0// R2== R0?
BEQ L2
ADD R1, R1, R0// sum = sum + i
ADD R0, R0, #1// increment i
B LOOP
L2:
ii. How many cycles are required for the pipelined ARM processor (with Hazard Unit) to issue all of these instructions? What is the CPI of the processor on this program? Assume that we always predict to take each branch instruction (and have to flush a certain number of partial instructions if we do not take the branch).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!