Question: Consider the following loop. LOOP: LDUR X 1 0 , [ X 1 , # 0 ] LDUR X 1 1 , [ X 1
Consider the following loop.
LOOP: LDUR XX #
LDUR XX #
ADD X X X
STUR XX #
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.
Cycle number:
LOOP: LDUR XX #
IF
ID
EX
ME
WB
LDUR XX #
IF
ADD X X X
STUR XX #
SUBI X X #
CBNZ X LOOP
nd iteration: LDUR XX #
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
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
