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 #
ADD
STUR #
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.
tableCycle number:,LOOP: LDUR XX #IFIDEXMEWBLDUR XX #IFADD X X XSTUR X#SUBI X X #CBNZ X LOOP,,,,,,,,,,,,,,,,,,,, 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 is calculated at the ID stage.
tableCycle number:,LOOP: LDUR XX #IFIDEXME WWLDUR XX #IFADD X X XSTUR XX #SUBI X X #CBNZ X LOOP,,,,,,,,,,,,,,,,,,,, iteration: LDUR XX #
d What is the speedup for the execution of c over a
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