Question
How much time the following code sequence takes when executed without forwarding and with forwarding? Can you reorder the code to avoid all stalls? if
How much time the following code sequence takes when executed without forwarding and with forwarding? Can you reorder the code to avoid all stalls? if yes, please reorder the code and execute the code with forwarding while providing the time it takes. Assume that each clock cycle takes 10 nano sec.
lh r1, 0(r5)
add r5, r1, r2
sh r1, 0(r5)
xor r10, r11, r11
slt r5, r1, r5
Execution without forwarding takes cycles. ( )
Execution without forwarding takes ns. ( )
Execution with forwarding takes cycles. ( )
Execution with forwarding takes ns. ( )
Reordered Code: 1 5
lh r1, 0(r5)
add r5, r1, r2
sh r1, 0(r5)
xor r10, r11, r11
slt r5, r1, r5
Execution with code scheduling (reordering) and with forwarding takes cycles. ( )
Execution with code scheduling (reordering) and with forwarding takes ns. ( )
11 points
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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