Question: Consider the following loop. Consider the following loop. load.d r1, 0(r2) addi r1, r1, #1 store r1, 0(r2) addi r2, r2, #4 subi r4, r3,

Consider the following loop.

Consider the following loop.

load.d r1, 0(r2)

addi r1, r1, #1

store r1, 0(r2)

addi r2, r2, #4

subi r4, r3, r2

bnez r4, Loop

Assume that the initial value of r3 is r2+596. Throughout this question, use the classic RISC five-stage integer pipeline and assume all memory accesses take 1 clock cycle.

a) Show the timing of this instruction sequence for the RISC pipeline without any forwarding or bypassing hardware but assuming a register read and a write in the same clock cycle forwards through the register. Assume branch is handled by flushing the pipeline. If all memory references take 1 cycle, how many cycles does the loop take to execute?

b) a) Show the timing of this instruction sequence for the RISC pipeline with normal forwarding or bypassing hardware but assuming a register read and a write in the same clock cycle forwards through the register. Assume branch is handled by flushing the pipeline. If all memory references take 1 cycle, how many cycles does the loop take to execute?

PLEASE EXPLAIN IN AS MUCH DETAIL AS POSSIBLE

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 Databases Questions!