Repeat 4.21.1 but now use NOPs only when a hazard cannot be avoided by changing or rearranging

Question:

Repeat 4.21.1 but 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.

Problem 4.21.1

If there is no forwarding or hazard detection, insert NOPs to ensure correct execution.


This exercise is intended to help you understand the relationship between forwarding, hazard detection, and ISA design. Problems in this exercise refer to the following sequences of instructions, and assume that it is executed on a 5-stage pipelined datapath:a. b. ADD R5, R2, R1 LW R3,4 (R5) LW R2,0(R2) R3, R5, R3 OR SW R3,0(R5) LW R2,0 (R1) AND R1, R2, R1 LW

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Computer Organization And Design The Hardware Software Interface

ISBN: 9780123747501

4th Revised Edition

Authors: David A. Patterson, John L. Hennessy

Question Posted: