Question: Q 2 . Use the following code fragment: Loop: ld x 2 , 0 ( x 1 ) ld x 4 , 0 ( x
Q Use the following code fragment:
Loop: ld
ld
add
sd
addi
addi
sub
bnez Loop
or
Assume that the initial value of is
Assume early evaluation of branch instruction, ie the branch outcome whether the condition is
true or false and where is the next instruction is known after the Decode stage., but the branch
instruction will still go through all the five pipeline stages.
For both Qa and Qb assume that the branch is handled by predicting it as nottaken, ie the
next instruction in program sequence the or instruction is fetched, which is a wrong instruction
except for the last iteration and will be flushed after the branch outcome is known.
a pts Show the timing of this instruction sequence for the stage RISC pipeline without
any forwarding hardware but assuming that a register read and a write in the same clock
cycle "forwards" through the register file, as between the "add" and or shown in Figure
C Use a pipeline timing chart like that in Figure C If all memory references take
cycle in the MEM stage how many cycles does this loop take to execute?
b pts Show the timing of this instruction sequence for the stage RISC pipeline with
full forwarding hardware. Use a pipeline timing chart like that shown in Figure C If all
memory references take cycle in the MEM stage how many cycles does this loop take
to execute?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
