Consider a 5−stage pipeline - IF (Instruction Fetch), ID (Instruction Decode and register read), EX (Execute), MEM (memory), and WB (Write Back). All (memory or register) reads take place in the second phase of a clock cycle and all writes occur in the first phase. Consider the execution of the following instruction sequence:
I1:I2:I3:I4:sub r2,r3,r4sub r4,r2,r3sw r2,100(r1)sub r3,r4,r2/*r2←r3−r4*//*r4←r2−r3*//*M[r1+100]←r2*//*r3←r4−r2*/