hi all,
five stage pipeline(if,id,ex,ma,wb)
consider the following sequence of instructions:
LD R10,1000[R20] ;LOAD R10 FROM MEMORY, ADDR R20+1000
ST 2000[R20],R10 ;STORE R10 TO MEMORY, ADDR R20+2000
SUB R20,R20,4 ;R20=R20-4
BNZ R20,L1 ;GOTO L1 IF R20!=0
try to reorder such instructions and insert least 'nop' to perform correctly;