Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume that the following sequence of instructions is executed on a 5-stage pipelined datapath: ADD R5,R2,R1 LW R3,4(R5) LW R2,0(R2) OR R3,R5,R3 SW R3,0(R5) a.
Assume that the following sequence of instructions is executed on a 5-stage pipelined datapath:
ADD R5,R2,R1
LW R3,4(R5)
LW R2,0(R2)
OR R3,R5,R3
SW R3,0(R5)
a. If there is no forwarding or hazard detection, insert NOPs to ensure correct execution. (10)
b. Now use nops only when a hazard cannot be avoided by changing or rearranging these instructions. You can assume register R7 can be used to hold temporary values in your modified code. (10)
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