Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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