Question: Problem #2. Consider the following code segment: 1 2 3 4 LD R1,0(R2) SUB R4,R1,R5 AND R6,R1,R4 OR R8,R4,R6 a. List all potential dependencies between

 Problem #2. Consider the following code segment: 1 2 3 4LD R1,0(R2) SUB R4,R1,R5 AND R6,R1,R4 OR R8,R4,R6 a. List all potential

Problem #2. Consider the following code segment: 1 2 3 4 LD R1,0(R2) SUB R4,R1,R5 AND R6,R1,R4 OR R8,R4,R6 a. List all potential dependencies between the instructions by placing RAW,WAR,RAR,WAW the appropriate cells. (note: can have more than one type of dependency between two instructions). Instr # 1 2 3 4 1 2 3 4 b. List all of the data hazards that would exist in the 5 stage (IF/ID/EX/MEM/WB) pipeline. Remember that a dependency may exist that is not a hazard on your particular pipeline. c. Assume that your CPU cannot forward. Without changing the order of instructions show how the minimal number of NOPS can be inserted between the instructions to eliminate the hazards. d. Assume that your CPU can forward. Now show the minimal number of NOPS that must be inserted to eliminate the hazards

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!