Consider the following sequence of instructions exccuted on the basic 5 stage pi
ID: 3908499 • Letter: C
Question
Consider the following sequence of instructions exccuted on the basic 5 stage pipelin... lw $t3,0 (St1) or $t5, $t3, $t4 and $t6, $t7, $t3 add $t7, $t6, $t1 a) Assuming our processor has no forwarding or hazard detection, insert a minimal amount of pipeline stalls to ensure correct execution (you may stall the pipeline with the instruction add $zero, $zero, $zero b) Assuming our processor has no forwarding or hazard detection, rearrange the ns and add stalls only if necessary to ensure proper execution. The values contained in the registers after executing your modified code should be equivalent to the unmodified executionExplanation / Answer
a)
lw $t3,0($t1)
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
or $t5, $t3, $t4
and $t6, $t7, $t3
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
add $t7, $t6,$t1
b)
lw $t3,0($t1)
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
and $t6, $t7, $t3
or $t5, $t3, $t4
add $zero $zero $zero
add $zero $zero $zero
add $zero $zero $zero
add $t7, $t6,$t1