1. LD R1, 45(R2) 2. DADD R7, R1, R5 3. DSUB R8, R1, R6 4. OR R9, R5, R1 5. DADD
ID: 3611560 • Letter: 1
Question
1. LD R1, 45(R2)
2. DADD R7, R1, R5
3. DSUB R8, R1, R6
4. OR R9, R5, R1
5. DADD R10, R8, R5
6. XOR R2, R3, R4
By using the above code, answer the followingquestions:
Q.1. identify each dependency by type; list the twoinstructions involved; identify which instruction is dependent; andname the storage location involved. [5]
Q.2 Draw the 5 stage pipelined diagram using“Forwarding” and without using“Forwarding”. [10+10].
Note: One solved template example is givenbelow, you can do question#2 according to this format.
You are required to visit the following internet link beforestarting the assignment.
http://en.wikipedia.org/wiki/Instruction_pipeline
Explanation / Answer
1. LD R1, 45 (R2)
Instruction 2 is dependant on1 waiting for R1 value
2. DADD R7, R1,R5
3. DSUB R8, R1,R6 Instruction 3 is dependent on1 waiting for R1 value
4. Or R9, R5,R1 Instruction 4 is dependent on 1 waiting for R1 value
5. BNEZ R7,target Instruction 5 is dependent on 2 waiting for R7 value
6. DADD R10, R8,R5 Instruction 6 isdependent on 3 waiting for R8 value
Control dependences : -
2. DADD R7, R1, R5
Instruction 2 is dependent on 1 waiting for R7 value
3. BNEZ R7, target
Execution of instructions 6,7 is dependent on branchinstruction
If BNEZ (R7 0) is true, then the statements at the labeltarget get executed
Else statements 6, 7 get executed
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.