Again use independent externally initialized MIPS instruction tests. First preset $t0=7, $t1=5, and execute
add $t2, $t0, $t1
The normal result, also obtained with ALUSrc stuck at zero, is 12. If the line is stuck at one, the second ALU operand is the sign-extended low 16 instruction bits. For this exact instruction they encode rd=10, shift amount zero and function , giving . The erroneous result is therefore .
For the second test, preset $s0=L, $t3=4, memory at to 37 and memory at to 99, with both words valid and aligned. Execute
lw $t3, 0($s0)
Normally, and with ALUSrc stuck at one, the address is and the result is 37. With the line stuck at zero, the second ALU operand is the old $t3=4, so the load reads 99 from . Thus

Articles by others on the same topic (0)

There are currently no matching articles.