pipe3 - Revisiting Branch Hazard Solutions Stall Predict...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Revisiting Branch Hazard Solutions Stall Predict Not Taken Predict Taken h D l S l t Branch Delay Slot CSE 240A Dean Tullsen Predict Not Taken Branch IF ID EX MEM WB I+1 I+2 IF EX MEM WB IF ID EX MEM WB X EM B ID I+3 IF ID EX MEM WB (bubble) Branch I+1 IF ID EX MEM WB IF (bubble) (bubble) (bubble) Branch Target T+1 IF ID EX MEM WB IF ID EX MEM WB CSE 240A Dean Tullsen Delayed Branch Branch IF ID EX MEM WB I+1 (delay slot) I+2 IF ID EX MEM WB IF ID EX MEM WB X EM B I+3 IF ID EX MEM WB Branch I+1 (delay slot) IF ID EX MEM WB IF ID EX MEM WB Branch Target T+1 IF ID EX MEM WB IF ID EX MEM WB CSE 240A Dean Tullsen Filling the delay slot (e.g., in the mpiler) compiler) Can be done when? Improves performance when? lw R1, 10000(R7) add R5, R6, R1 eqz R5, label: beqz R5, label: sub R8, R1, R3 add R4, R8, R9 and R2, R4, R8 ,, add R2, R5, R8 label: CSE 240A Dean Tullsen
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Problems filling delay slot 1. need to predict __________ of branch to be most effective 2. limited by ______________ restriction CSE 240A Dean Tullsen Problems filling delay slot 1. need to predict __________ of branch to be most effective 2. limited by ______________ restriction tit i b db l i ____________ restriction can be removed by a canceling branch branch likely or branch not likely e.g., beqz likely elay slot instruction delay slot instruction fall-through instruction squashed/nullified/canceled if branch not taken CSE 240A Dean Tullsen Branch Likely Branch likely IF ID EX MEM WB I+1 (delay slot) I+2 IF (bubble) IF ID EX MEM WB X EM B (bubble) (bubble) (bubble) I+3 IF ID EX MEM WB Branch likely I+1 (delay slot) IF ID EX MEM WB IF ID EX MEM WB Branch Target T+1 IF ID EX MEM WB IF ID EX MEM WB CSE 240A Dean Tullsen Delay Slot Utilization 18% of delay slots left empty 11% of delay slots (1) use canceling branches and (2) end up getting canceled CSE 240A Dean Tullsen
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

pipe3 - Revisiting Branch Hazard Solutions Stall Predict...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online