At ICCD 2026
PDPM appears in the ICCD 2026 proceedings on pages 396–405. On November 16, I gave the first talk of its session and presented the poster at board 3C-L1.
The title slide of my talk.
The poster session, with PDPM on the right at board 3C-L1; my conference badge; and the poster.
The problem
Execution time is instruction count × cycles per instruction ÷ clock, and pipeline depth pulls the last two in opposite directions. A deeper pipeline has shorter stages and a faster clock, but in a small core with no branch predictor every taken branch flushes the instructions behind it, and the flush grows with depth. Branch-light code wants seven stages and branch-heavy code wants three. Chips have shipped with anywhere from 2 to 31 stages, and Hartstein and Puzak showed in 2002 that the best depth depends on the workload, yet every one of those chips fixes its depth at design time.
Effective time per instruction, CPI ÷ clock, for each depth as the share of taken branches grows. Flush penalties are the measured 1, 2 and 5 cycles; clocks are the analytical plan, 1.1, 1.3 and 1.5× a common base. Seven stages are fastest below about 6%, three stages above about 22%. Drag across the chart to move the line.
The best depth also depends on the clock plan. Under one shared clock almost every kernel prefers three stages. At the clocks my FPGA build actually reaches, five stages win, and when deeper pipelines clock faster, as the analytical plan assumes, seven do. It even changes inside one program. An SSM block from the deployment suite runs best at three stages, then five, then three again, and switching at those boundaries saves it 1.33% over its best fixed depth. So the depth has to be chosen at runtime, and the choice has to survive a change of clock plan.
The 300 edge-AI kernels of the deployment suite, one column each, colored by their fastest depth. The cycle counts are measured once; between plans only each depth's clock changes. Below, the mean time each policy spends above the per-kernel best. Every fixed depth is best under one plan and up to 20.6% worse under another. PDPM keeps its weights frozen and changes two constants per plan; left unchanged, the same head keeps picking three stages and costs +5.90% and +14.98% under the other two plans. Its worst retargeted mean, 0.67%, comes when deeper clocks run faster and seven stages nearly tie with five.
Prior work
Three lines of work come close. Dynamic voltage and frequency scaling, guided by hardware counters, adapts the clock but leaves the depth fixed, even though the clock a pipeline can reach is set by its depth. Reconfigurable designs either merge pipeline stages on power or slack heuristics (dynamic pipeline scaling) or switch between a big and a little core at the cost of a complete second datapath (composite cores). Learning has steered memory controllers, resource management, design-space exploration and branch prediction, where Jiménez and Lin's perceptron predictor is the closest ancestor of my head, but not runtime pipeline depth. PDPM brings the three together in one core: a single seven-stage datapath, a learned head that picks the depth at runtime, and a clock plan for each depth.
One datapath, three depths
I wrote the RV32IM core in Verilog, about 4,000 lines, as a seven-stage superset: IF1, IF2, ID, EX1, EX2, MEM and WB. Four bypass multiplexers make pipeline registers transparent, so three, five and seven stages are the three symmetric settings of that one datapath. Four or six stages would need asymmetric merges and their own hazard logic, and would add no operating point the three do not already cover. All modes share the register file and memory, so a depth switch moves no architectural state: fetch holds, the pipeline drains for at most seven cycles, and the bypass signals flip on one clock edge. Changing the clock is a separate and slower step. The core reprograms the FPGA's clock manager (MMCM) and waits about 21.5 µs for it to relock, which a 200-instruction window cannot pay back, so the clock follows the plan while the depth follows the program.
My animations from the talk. The datapath view shows which pipeline registers each mode bypasses as instructions flow through; the timing view shows the same execution cycle by cycle, with branch flushes and forwarding. Switching is one live run that changes from five to seven to three stages and back.
Predicting two ratios instead of twelve classes
My first predictor was a classifier over (depth, clock) pairs, three depths at four clock rungs. But a depth's cycle count does not change with the clock, so a slower rung can only lose, and nine of the twelve classes can never be the answer. Since time is cycles ÷ clock, I divided each depth's time by the five-stage time. The program's length cancels, and what remains are two cycle ratios, C3/C5 and C7/C5, that do not depend on the clock plan at all. Every 200 instructions the head reads four counters (branch-flush rate β, the cycle sensitivity to depth ρ, load-use stall rate σ, and log program length ℓ), regresses the two ratios, divides them by the plan's constants, and picks the smallest. A confidence margin and a 16-entry phase memory keep it from switching back and forth.
One kernel from the deployment suite, a 4-bit grouped matrix-vector product. Left, its twelve (depth, clock) choices: with the cycles fixed, only each depth at its own maximum clock (ringed) can win. Right, its two ratios divided by each plan's constants. The prediction stays the same while the chosen depth follows the plan: three stages at one clock, five at the FPGA's clocks, seven when deeper clocks run faster.
The weight count drops from 60 int8 weights to 10, but the accuracy gain comes from the target itself. A 3-class depth classifier with the same features, folds and seeds reaches 90.73%; replacing its labels with the two ratio targets lifts it to 94.28%. A ratio also carries the size of each mistake into the loss, where a label treats every mistake alike, so the regressor's errors are cheaper: 167 errors at a mean 1.10% of execution time, against 251 at 1.50%.
The head comes in two forms. The characterization head is where predictor designs compete: every candidate reads the same four features from RTL simulation at all three depths, so only the target differs between them. Its depth sensitivity ρ needs the cycle counts of two depths for the same window, which a running core cannot see, so its deployable version swaps in a proxy ρ̂ built from the branch-flush and stall rates, at a cost of 4.9 points of accuracy. The hardware head is the one synthesized for the board, and it needs no multiplier. Each one-bit event that fires adds its int16 weight to a running sum, so the prediction is ready the moment the window closes, and because it regresses the log of each ratio, a clock plan enters as two added biases.
Results
Two suites test two different things. The coverage suite, 301 programs under nested 5-fold cross-validation, keeps all three depths contested (60, 141 and 100 programs prefer each), so the characterization heads compete there. The deployment suite is 340 programs of 2026 edge inference that I wrote in C at microcontroller scale, 16 KB of memory and integer arithmetic only: 300 kernels from 44 families, from attention and quantized GEMM to Mamba scans and robotic action heads, and 40 pipelines that chain them into ten model types. The hardware head is fitted on the kernels and tested on the pipelines, and the two suites share no program. Accuracy is the share of decision windows on which a policy picks the oracle's configuration, and overhead is the time it spends above that oracle.
Policy Overhead Accuracy Weights
Coverage suite, 301 programs, against the per-window oracle
Always 5 stages at 1.3× (best static) +2.572% 46.84% —
UCB1 bandit, 12 arms +23.565% 9.24% —
12-class perceptron classifier +0.232% 91.62% 60
3-class depth classifier +0.178% 90.73% 15
MLP, 7→4→12 71.70% 92
PDPM, trace ρ (ceiling) +0.107% 94.28% 10
PDPM, proxy ρ̂ (deployable) +0.255% 89.40% 10
Against the strongest static configuration PDPM's overhead is 24× lower, and the mean is not hiding a tail: 8 of 301 programs exceed 0.5% overhead under PDPM, against 149 for always running five stages at 1.3×. Bigger models do not help with 301 labeled points; the MLP loses more than 20 points to the 12-class linear classifier. A branch-rate threshold does not work either, because the boundary between depths is two-dimensional, in branch rate and depth sensitivity together.
Every program by branch-flush rate β and cycle sensitivity ρ, colored by its best depth. The learned boundaries (dashed) place 92.7% of the 301 fitted benchmarks and 87.3% of the 300 held-out kernels correctly. All 37 kernels past β = 55% are best at seven stages, which a branch-rate threshold (solid) would call three.
The harder test is the 40 pipelines, which neither head saw. The hardware head was fitted only on the isolated kernels, yet it follows the depth changes inside these programs, settling within about 200 cycles of each kernel boundary, and it picks the best depth on 313 of 315 phases, against 301 for a decision tree. Because it switches inside programs, it even finishes 0.437% faster than keeping the best single depth for each program.
Depth over time inside two unseen pipelines. Upper lane, the fastest depth for each phase; lower lane, the depth the hardware head served. The SSM block runs three, five, three stages and stays on the best depth for 99.7% of its cycles. Speech 2 is the same program under three clock plans, and with the same weights the head follows three, five, three stages, then five throughout, then seven, five, seven.
Policy, 40 unseen pipelines Overhead Phases on the best depth
Always 7 stages +17.107%
Always 5 stages +3.124%
Always 3 stages (best static) +0.209%
Depth-3 decision tree +0.211% 301 / 315
PDPM, fit on the kernels −0.437% 313 / 315
Fixed clock, against a per-program oracle that keeps the best single depth for each program. A negative overhead is only possible by switching depth inside a program.
On the FPGA
I brought the CPU up on a Lattice iCE40 and moved it to a Xilinx Artix-7 once the benchmarks needed 16 KB memories. There the hardware head drives the mode controller from the core's own counters, with no host in the loop. The one-ratio head closes timing at 90.32 MHz and the three-depth head at 87.1 MHz. The predictor takes 478 LUTs and 192 flip-flops, 0.75% of the device, and no DSP. To check correctness more strictly than a checksum, I recorded the ordered sequence of every register write and store and compared it with a fixed-depth run of the same binary. They were identical on all 641 programs, across 144 to 1,315 self-initiated depth switches. Morphing changes when results appear, never what they are. A separate bitstream lets the core retune its own clock alongside its depth through the MMCM; the switch counter reached 470, and relock measured 21.08 to 21.44 µs.
The result I find most interesting came from synthesis. At one clock the head never picks seven stages, so with the weights frozen the mode bit that selects it is a constant, and the tools removed the whole seven-stage datapath, 24% of the design, without any edit to the RTL. In a morphable core the policy and the datapath cannot be separated, and depth becomes a parameter of the policy. When a clock plan makes seven stages worth having, reinstating the second output keeps that datapath, and the controller selects it on the board.
What PDPM shows
The best pipeline depth depends on the program, its phase and the clock plan, so it should be chosen at runtime.
One merged seven-stage pipeline holds all three depths without a second datapath and switches between them in a few cycles.
Predicting two cycle ratios beats classifying configurations, with six times fewer weights and cheaper mistakes.
A frozen perceptron is small, follows a new clock plan by changing two constants, and holds up on AI pipelines it has never seen.
Statistics behind the ablation
Every number comes from nested cross-validation: an outer 5-fold split wrapping an inner 3-fold split, repeated over three fold permutations and three weight initializations, for 45 outer trials per model. The family-selection rule was committed before any outer-test result was seen. Because the 3-class classifier and the regressor see identical folds, seeds and training sets, they can be compared trial by trial. Paired over the 45 trials, regression is 3.11 points more accurate (95% bootstrap CI 1.78 to 4.48, Wilcoxon p = 1.3×10⁻⁴) at 0.072 points lower overhead (p = 1.2×10⁻⁵). Its 90th-percentile error costs 2.30% of execution time against 3.14%. Outer-test accuracy matches inner validation, so the weights depend on the features rather than on benchmark identity.
The proxy ρ̂ is a cubic polynomial in β plus a stall term, its shape taken from the Taylor expansion of the analytical relation ρ ≈ 4β/(1+β). Out of fold it tracks trace ρ at r = 0.959.
Energy, other benchmarks, slower memory
The same formulation retargets to energy. Per-mode dynamic power measures 0.448, 0.365 and 0.413 mW/MHz, and folding those into the two constants takes the closed loop from +0.454% to −0.265% of a per-program energy reference, with the weights untouched. On the twelve Embench IoT 1.0 programs that fit the runtime, accuracy holds at 93.3%. Letting the clock follow the depth is worth a further 5.8% on the deployment kernels, and 5.1% once the measured relock is charged. With slower memory the depths separate further: at a 10-cycle miss latency seven stages win outright on 28 of the 301 programs, and on 56 of 298 at 240 cycles, by up to 23.7%.
Limitations and next steps
Depth sensitivity ρ is exact only with both modes measured, and the single-mode proxy costs 4.9 points; probing the other depth at runtime is in the RTL but does not pay at these margins. Closing that gap cheaply is the open problem. Memory is single-cycle in the main results, and the core implements the unprivileged RV32IM datapath, without precise exceptions, interrupts or virtual memory. Those are the next steps toward full applications.
The architecture figure from the paper
(a) The morphable datapath. Blue stages exist only in the seven-stage mode; bypass multiplexers collapse the rest. (b) Per-window event counters feed the two-output ratio head, whose smallest predicted time drives the mode controller.
My role Everything from RTL to results: the Verilog core and controller, the benchmark suites, training and evaluation, and FPGA bring-up. The artifact is open source and reproduces every number in the paper.