1. Read the following set of instructions, and answer questions.
add r5, r2, r1
lw r3, 4(r5)
or r3 , r5, r3
sw r3 , 0(r5)
add r2, r5, r1
b. Assume there are no forwarding, show the result in multiple-cycle diagram.
Answer -
1. Read the following set of instructions, and answer questions.
add r5, r2, r1 -> add the value of r5 and r2 in r1.
lw r3, 4(r5) -> load the value of r3 to r5.
or r3 , r5, r3 -> organize the value of r3 and r2 in r3.
sw r3 , 0(r5) -> (sw instruction stores a word from a register into memory) store the value of r3 to r5.
add r2, r5, r1 -> add the value of r2 and r5 in r1.
b) multiple-cycle diagram
Get Answers For Free
Most questions answered within 1 hours.