Fetch stays full only when prediction guesses both direction and target correctly. This topic covers predictor structures, MPKI and recovery math, fetch timing, and debug.
Question | Answered by | Wrong guess costs |
|---|---|---|
Taken or not taken | Direction tables (bimodal, gshare) | Flush of wrong-path work |
Where to if taken | BTB target, return stack, indirect predictor | Redirect delay plus refill |
Was it worth it | MPKI and recovery math | CPI added per thousand instructions |
Lesson | What it covers |
|---|---|
Direction tables, BTB targets and the return stack, with a runnable model. | |
MPKI, accuracy and penalty tied to CPI with hand-checkable numbers. | |
Lookup latency, flush depth and refill, and flat IPC despite better accuracy. | |
Branch-type debug, storage cost math, ROI, and interview drills. |
MPKI is 40 and CPI added is 40 x 10 / 1000 = 0.40. The lesson on MPKI math shows each step.