Repository navigation
T49: unrolling recovers the throughput without recovering the operator - #839
Merged
Merged
Conversation
Replacing an operator by k repetitions of a depth-1 step raises the clock and divides throughput by k. Unrolling into k pipeline stages restores one result per cycle at k times the step's area -- and does not restore the operator, because each stage is still the step. The closed form does restore it: the k-fold composition is a multiplication by structure constants. Measured: the pipelined golden-scale layer is 660 cells at 204.08 MHz, one element per cycle, against 1098 cells at 69.21 MHz for the multiplier -- 1.66x smaller and 2.95x faster, no multiply anywhere. This corrects T48's reading, which measured the iterative form and found it 2.15x slower per element. That was the implementation, not the lattice. Audits run locally: RU and EN PASS, 27 routes.
github-actions Bot
added a commit
that referenced
this pull request
Aug 18, 2026
T49: unrolling recovers the throughput without recovering the operator (#839) Replacing an operator by k repetitions of a depth-1 step raises the clock and divides throughput by k. Unrolling into k pipeline stages restores one result per cycle at k times the step's area -- and does not restore the operator, because each stage is still the step. The closed form does restore it: the k-fold composition is a multiplication by structure constants. Measured: the pipelined golden-scale layer is 660 cells at 204.08 MHz, one element per cycle, against 1098 cells at 69.21 MHz for the multiplier -- 1.66x smaller and 2.95x faster, no multiply anywhere. This corrects T48's reading, which measured the iterative form and found it 2.15x slower per element. That was the implementation, not the lattice. Audits run locally: RU and EN PASS, 27 routes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T49 — an iterative operator loses throughput; unrolling it recovers the throughput without recovering the operator.
Replacing an operator by
krepetitions of a depth-1 step raises the clock and divides throughput byk. Unrolling those repetitions intokpipeline stages restores one result per cycle atk× the step's area — and does not restore the operator, because each stage is still the step.The closed form does restore it: for a group generated by one step, the k-fold composition is a multiplication by structure constants. Here
φ^k = F(k−1) + F(k)·φmakes the scale two multiplications by Fibonacci numbers, which is the operator back.Measured by place-and-route (nextpnr-ice40, hx8k, fan-in 8), from trinity-fpga#592:
1.66× smaller and 2.95× faster, with no multiply anywhere.
This corrects the reading of T48, which measured the iterative form and found it 2.15× slower per element. That was the implementation, not the lattice — and T48's arithmetic stands, it is the conclusion drawn from it that narrows.
The refusal: unrolling costs 354 cells against 97 for the iterative scale block, 3.6×, so below about
k = 4the iterative form delivers the same rate for less. iCE40 has no DSP blocks, so the multiplier is maximally penalised; fan-in 8; no board.Ratchet 179/26 against baseline 184/27, no file gained. Audits: RU and EN PASS, 27 routes.