Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the below set of instructions, assume a 5 stage pipeline that there is no hardware forwarding or hazard detection. The compiler/assembler must insert nops

For the below set of instructions, assume a 5 stage pipeline that there is no hardware forwarding or hazard detection. The compiler/assembler must insert nops where the data hazard exists to insure the correct answer.

a) Rewrite the code by inserting nop(s) in the proper location to insure the correct result.

lw x8, 120(x5)

sub x5, x5, x8

and x8, x8, x9

add x8, x8, x5

b) If the 5-stage pipeline now added forwarding from the MEMWB pipeline register with no hardware data hazard detection, rewrite the assembly with the appropriate NOPs where required to insure proper operation.

c) If the 5-stage pipeline now added forwarding from just the EXMEM pipeline register with no hardware data hazard detection, rewrite the assembly with the appropriate NOPs where required to insure proper operation.

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_2

Step: 3

blur-text-image_3

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

7. LO12-7 Describe the importance of quality as a competitive tool.

Answered: 1 week ago

Question

What is an employee assistance program?

Answered: 1 week ago