Question
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
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