Consider the following MIPS code and a 5 stages processor as discussed in class, and assume the loop executes 3 times:
loop: lw r1,4(r7)
lw r2,8(r7)
lw r3,12(r7)
add r1,r1, r3
sw r1,4(r7)
bne r1,r2,loop
addi r1,r1,42
c. Draw the execution diagram. (10 points)
d. The CPI (cycles per instruction) is obtained by computing the ratio of total cycles to number of instructions. Compute the CPI for the for the pipeline on this code. (5 points)
PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR YOU
Get Answers For Free
Most questions answered within 1 hours.