CS230 Lecture 15: CS230 LECTURE NOTE 15
Document Summary
If -> id -> ex -> mem -> wb. Disadvantage: latency argument: hard to figure out individual instruction, latency is hurt. ;; compute the average of the values in and . ;; assuming that the twoints front end has initialized the registers. ;; save the result in memory at the address identified by the data label. ;save the result in the address at data label add , , addi , sh, 2 div , mflo lis . word data sw , 0() jr data: . Data hazard occurs when there are interdependency between each instructions. Forwarding/bypassing sometimes solve problem of data hazard by eliminating the bubbles. Try to avoids all stalls bubbles when there is memory access: Example: is this a data hazard? sw , 0() addi , sh, 0. If we don"t have any forwarding, writing won"t be updated unless the 5th stage of sw has been executed.