No. 141 / project of 147 on the ladder

Adaptive second-word I-cache repair

introduces — demand-fetch-based second-word repair budget; adaptive I-cache repair policy counter; near-P134 shell recovery

harden statelast run2026-05-06
signoff
  • DRCNOT RUN
  • LVSNOT RUN
  • antennaNOT RUN

P141 keeps P140’s repair-aware direction but makes the budget adaptive. Demand-fetch lines get two background repair words; prefetch-only lines stay at one.

checkresult
Verilator buildPASS
BusyBox shell workload reaches P141-FILE-OKPASS
Aux-load queue full dropsPASS
Aux response errors/cancelsPASS
Hardened layoutNOT RUN
metricP134P140P141
post-load cycles218,247,567220,083,644219,252,781
shell window cycles64,221,64265,035,48164,289,267
retired instructions86,139,76086,226,71785,956,781
CPI2.53362.55242.5507
S_FETCH cycles7,617,6957,623,2907,613,755
S_MEM cycles27,799,34329,353,26729,236,897

P141 is a speed PASS versus P140 by 746,214 cycles. It also beats P138 by 348,494 cycles. It still trails P134 by 67,625 cycles.

repair-usefulness counterP140P141
background repair word fills32,047,00632,151,196
first later fetch hits1,319,1141,351,543
repeat later fetch hits552,003602,447
first-hit usefulness ratio4.12%4.20%
first + repeat fetch-hit ratio5.84%6.08%
P141 policy bucketcount
repair starts58,487,274
second-word grants2,739,556
budget stops31,449,945
already-valid word skips148,562
budget at end0

This is the first repair-policy result that nearly closes the P134 gap without returning to P139’s full repair stream. The adaptive rule adds only about 104K repair fills versus P140, but improves useful fetch hits and recovers most of the shell-window loss.

The next rung should be selective prefetch-side second-word repair: grant a second word to prefetch lines only when they directly feed the fetch queue or when the frontend is instruction-starved.

shell phases label P141 shell workload cycles 219,252,781 cpi 2.55
  1. kernel banner to /init 117,336,018 53.7%
  2. /init to shell banner 1,100,612 0.5%
  3. shell banner to first command 35,898,051 16.4%
  4. echo command 1,649 0%
  5. uname -a 2,253,034 1%
  6. ls /bin /usr/share 31,999,991 14.6%
  7. cat sample file 3,248,980 1.5%
  8. touch/write/cat/rm /tmp file 10,593,596 4.9%
  9. 8x ash loop with file I/O 16,191,337 7.4%
  10. final marker 680 0%
state breakdown label P141 adaptive second-word I-cache repair workload cycles 219,252,781 cpi 2.55
  1. fetch 3.5% 7,613,755
  2. execute 39.2% 85,981,521
  3. mem 13.5% 29,515,319
  4. walker 1.2% 2,664,582
  5. writeback 39.2% 85,956,781
  6. mul/div 3.4% 7,519,107