S4 Computer architecture · Practice
Problem set 2: pipelines, prediction and out-of-order execution
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 15 kinds solid
Check
A core with 90 FO4 of logic per instruction, 3 FO4 of overhead per stage and 0.09 stall cycles per instruction per stage.
(a)
Optimal depth?
(b)
Time per instruction there, in FO4?
(c)
FO4 per cycle there?
Check
The same model at a fixed depth of 28 stages: 120 FO4 of logic, 3.5 FO4 overhead, 0.07 stalls per instruction per stage.
(a)
Overhead share of each cycle?
(b)
Time per instruction, in FO4?
Check
A core with base CPI 0.9: 0.16 of instructions are branches, 0.03 mispredicted, resolved at stage 20.
(a)
Misprediction CPI?
(b)
Speedup if a better predictor halves the misprediction rate?
Check
A loop of 12 iterations runs over and over.
(a)
1-bit predictor misprediction rate?
(b)
2-bit counter?
Check
A predictor table of two-bit counters, with 400 active branches.
(a)
Table size, in bits?
(b)
Chance a given branch shares its entry?
Check
Branches are 0.15 of instructions, 0.55 of them taken; the BTB holds 0.95 of taken targets (miss cost 4 cycles), and direction accuracy is 0.94 (penalty 15).
(a)
CPI from BTB misses?
(b)
CPI from direction mispredictions?
Check
A 4-wide out-of-order core averaging 25 cycles per instruction in flight, with a 256-entry window.
(a)
Window for full width?
(b)
Sustainable IPC with 256 entries?
Check
A core renames 32 architectural registers for 160 in-flight instructions (0.8 write a register); it has 3 result buses, and 0.75 of instructions produce results.
(a)
Physical registers?
(b)
IPC limit from the result buses?
Check
A floating-point multiplier gets 0.6 instructions per cycle, each waiting 6 cycles for operands and executing for 4; elsewhere, a chain of 7 dependent multiplies runs alone.
(a)
Reservation stations needed on average?
(b)
Cycles for the chain, with 1 cycle of CDB broadcast per link?
Check
A 300-entry window, a branch every 1/0.17 instructions, accuracy 0.94.
(a)
Chance the youngest instruction is on the correct path?
(b)
Expected useful instructions?
Check
A core fetches 6 per cycle with 0.75 useful and commits at most 3; 0.3 of instructions are loads, 0.01 of them replayed at 15 cycles each.
(a)
Best IPC?
(b)
CPI added by replays?
Check
A deep pipeline resolves branches at stage 18; a shallow one resolves them at stage 6 but its clock period is 1.5× longer. Branches are 0.2 of instructions, 0.08 mispredicted; ignore other stalls.
(a)
CPI of the deep design?
(b)
Shallow design's time per instruction relative to the deep one's?
Check
A 4-wide fetch meets a taken branch every 6 instructions and loses 2 cycle(s) on each redirection.
(a)
What fetch rate does it reach?
Check
A µop cache delivers 6 µops a cycle on hits (0.75 of µops) and the decoders 4.
(a)
What average rate results?
Check
Branches are 0.15 of instructions, predicted 0.95 right with a 20-cycle penalty; the instruction cache misses 8 times per thousand instructions at 20 cycles.
(a)
What CPI does the front end lose?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in S4