Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

8. (10 points) If the ‘beq’ instruction is implemented in the ID stage, how do t

ID: 3706926 • Letter: 8

Question

8. (10 points) If the ‘beq’ instruction is implemented in the ID stage, how do the codes below execute
correctly? We would like to use forwarding to reduce the use of ‘nops’.
a):
sub t1, t2, t3
beq t1, t2, label
b):
sub t1, t2, t3
add t0, t2, t3
beq t1, t2, label
c):
lw t1, 5(s0)
beq t1, t0, label

8. (10 points) If the 'beq instruction is implemented in the ID stage, how do the codes below execute correctly? We would like to use forwarding to reduce the use of nops' sub t1, t2, t3 beq t, t2, label sub t1, t2, t3 add t0, t2, t3 beq t1, t2, label lw t1, 5(s0) beq t1, to, label

Explanation / Answer

a) sub t1,t2,t3
nops
beq t1,t2,label //forward t1 from MEM->ID
b) sub t1,t2,t3
add t0,t2,t3
nops
nops
beq t1,t2,label //Forward at instruction #1 to instruction #3 at WB -> EX and at instruction #2 to instruction #3 at MEM -> EX
c) lw t1,5(s0)
nops
nops
beq t1,t0,label //forward to from WB->ID


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote