Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started