Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the following, we have a code fragment of LEGV8 assembly: STUR X16, [X6, #12] LDUR X16, [X6, #8] SUB X7, X5, X4 CBZ X7,

image text in transcribed

In the following, we have a code fragment of LEGV8 assembly: STUR X16, [X6, #12] LDUR X16, [X6, #8] SUB X7, X5, X4 CBZ X7, Label X1, X4 ADD X5, SUB X5, X15, X4 Assume we run this code on a pipeline CPU that has only one memory for both instructions and data. In this case, there could be a structural hazard every time a program needs to fetch an instruction during the same cycle in which another instruction accesses data. 1- Show where to insert NOPs in the code above to avoid the structural hazard. 2- In your opinion, is there any solution to reduce the number NOPs? Like reordering the instructions. 3- Do you think that we must handle this structural hazard in hardware? You know that data hazards can be avoided by inserting NOPs between assembly instructions. Can we do the same with this structural hazard? If so, explain how. If not, explain why not. 4- If we run the code above on a single-cycle computer, what kind of hazards are there

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

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago