Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 r8, 0(r9)

add r9, r8, r2

sh r8, 0(r9)

xor r10, r11, r11

slt r9, r8, r9

Execution without forwarding takes [ ] cycles. (Write the number without a unit or space to get the degree)

Execution without forwarding takes [ ] ns. (Write the number without a unit or space to get the degree)

Execution with forwarding takes [ ] cycles. (Write the number without a unit or space to get the degree)

Execution with forwarding takes [ ] ns. (Write the number without a unit or space to get the degree)

Reordered Code: Arrange the previous code by writing the new instruction order number next to it from 1 to 5 if possible to get rid of the Hazard

[ ] lh r8, 0(r9)

[ ] add r9, r8, r2

[ ] sh r8, 0(r9)

[ ] xor r10, r11, r11

[ ] slt r9, r8, r9

Execution with code scheduling (reordering) and with forwarding takes [ ] cycles. (Write the number without a unit or space to get the degree)

Execution with code scheduling (reordering) and with forwarding takes [ ] ns. (Write the number without a unit or space to get the degree)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

1-4 How will MIS help my career?

Answered: 1 week ago