No. 131 / project of 147 on the ladder

Dispatch queue module extraction

introduces — state-owning shadow dispatch queue module; ready/valid queue counters; top.sv refactor pattern

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

P131 takes the first real step toward breaking up top.sv: a new p131_dispatch_queue_module3 owns the shadow queue state internally and exports the same valid / ready / fire observations that P130 computed around local core registers.

checkresult
Verilator buildPASS
BusyBox shell workload reaches P131-FILE-OKPASS
Dispatch queue module counters emittedPASS
Hardened layoutNOT RUN
module countervalue
samples64,676,692
arrival-fire cycles22,634,431
service-fire cycles22,634,358
backpressure cycles0
dual-ready cycles0
triple-ready cycles0
flush clears72
per-class counterintegermemorycontrol
arrival fires13,086,3783,242,6366,305,417
service fires13,086,3783,242,5636,305,417
max occupancy111
count at end010
metricP130P131
post-load cycles218,446,005218,215,879
shell window cycles64,551,55664,299,031
retired instructions86,248,13286,172,041
CPI2.53282.5323
S_FETCH cycles7,620,5587,618,031
S_MEM cycles27,709,66027,681,021

This is not a speedup claim because the new queue is shadow-only. The useful result is structural: the module-owned state exactly agrees with the P130-style contract helper on fire counts and backpressure in the same shell run.

That gives us a repeatable top.sv refactor rule: move one state cluster into one small module, keep the older counters for one rung, run BusyBox, compare, then decide whether to delete the old local state or make the module active.

shell phases label P131 shell workload cycles 218,215,879 cpi 2.53
  1. kernel banner to /init 116,719,644 53.6%
  2. /init to shell banner 1,083,336 0.5%
  3. shell banner to first command 35,485,801 16.3%
  4. echo command 1,649 0%
  5. uname -a 2,367,640 1.1%
  6. ls /bin /usr/share 31,877,655 14.7%
  7. cat sample file 3,038,213 1.4%
  8. touch/write/cat/rm /tmp file 10,832,919 5%
  9. 8x ash loop with file I/O 16,180,275 7.4%
  10. final marker 680 0%
state breakdown label P131 dispatch queue workload cycles 218,215,879 cpi 2.53
  1. fetch 3.5% 7,618,031
  2. execute 39.5% 86,196,725
  3. mem 12.8% 27,959,875
  4. walker 1.2% 2,692,400
  5. writeback 39.5% 86,172,041
  6. mul/div 3.5% 7,575,091