Question: Use the following code fragment: Loop: ld x 2 , 0 ( x 1 ) ld x 4 , 0 ( x 3 ) add
Use the following code fragment: Loop:
ld xx
ld xx
add x x x
sd xx
addi x x
addi x x
sub x x x
bnez x Loop
or x x x
Assume that the initial value of x is x 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 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 Use a pipeline timing chart. If all memory references take cycle in the MEM stage how many cycles does this loop take to execute
b Show the timing of this instruction sequence for the stage RISC pipeline with
full forwarding hardware.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
