Question: Consider the following loop. LOOP: LDUR X 1 0 , x 1 , # 0 LDUR X 1 1 , 1 , # 8 ADD
Consider the following loop.
LOOP: LDUR X#
LDUR X#
ADD X X X
STUR X#
SUBI X X #
CBNZ X LOOP
a Assume that data and control hazards are handled by simply stalling the pipeline ie inserting NOP
instructions where necessary Show the pipeline timing diagram of the code execution.
b Can you reorder the code to reduce the number of stalls? If yes, show the reordered code.
c Show the pipeline timing diagram of the code execution with data forwarding and assume that the
branch is handled by predicting it as taken and the branch target address is calculated at the ID
stage.
d What is the speedup for the execution of c over a
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
