From d09975ba3a5695e663cb5178c4020bd093f7b45a Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Tue, 18 Aug 2026 16:13:44 +0700 Subject: [PATCH] T49: unrolling recovers the throughput without recovering the operator 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. --- apps/website/src/data/verificationScience.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apps/website/src/data/verificationScience.ts b/apps/website/src/data/verificationScience.ts index 2d5886ee4d..30fe7c05c0 100644 --- a/apps/website/src/data/verificationScience.ts +++ b/apps/website/src/data/verificationScience.ts @@ -25,6 +25,25 @@ export type Theorem = { } export const THEOREMS: Theorem[] = [ + { + id: 'T49', + name: 'An iterative operator loses throughput; unrolling it recovers the throughput without recovering the operator', + nameRu: 'Итеративная операция теряет пропускную способность; развёртка возвращает её, не возвращая саму операцию', + statement: + 'Replacing an operator by k repetitions of a depth-1 step raises the clock and divides the throughput by k. Unrolling those repetitions into k pipeline stages restores one result per cycle at k times the area of the step — and, crucially, 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.', + statementRu: + 'Замена операции на k повторений шага глубины 1 поднимает частоту и делит пропускную способность на k. Развёртка этих повторений в k ступеней конвейера возвращает один результат за такт ценой k площадей шага — и, что существенно, НЕ возвращает саму операцию, поскольку каждая ступень остаётся шагом. Замкнутая форма её возвращает: для группы, порождённой одним шагом, k-кратная композиция есть умножение на структурные константы.', + worked: + 'The golden scale phi^k: iterating (a,b) -> (b, a+b) k times costs one adder and k cycles. The closed form phi^k = F(k-1) + F(k)*phi gives a·F(k-1) + b·F(k) and a·F(k) + b·F(k+1) — two multiplications by Fibonacci constants, the operator back. Unrolling the step instead: measured by place-and-route (nextpnr-ice40, hx8k, fan-in 8), the pipelined layer is 660 cells at 204.08 MHz and one element per cycle, against 1098 cells at 69.21 MHz for the multiplier — 1.66x smaller and 2.95x faster, with no multiply anywhere.', + workedRu: + 'Золотой масштаб phi^k: итерирование (a,b) -> (b, a+b) k раз стоит одного сумматора и k тактов. Замкнутая форма phi^k = F(k−1) + F(k)·phi даёт a·F(k−1) + b·F(k) и a·F(k) + b·F(k+1) — два умножения на числа Фибоначчи, то есть операция возвращается. Развёртка шага вместо этого: по трассировке (nextpnr-ice40, hx8k, fan-in 8) конвейерный слой занимает 660 ячеек на 204.08 МГц и выдаёт элемент за такт против 1098 ячеек на 69.21 МГц у умножителя — в 1.66 раза меньше и в 2.95 раза быстрее, и ни одного умножения.', + citation: 'Measured here; gHashTag/trinity-fpga #592, correcting #591', + url: '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/gHashTag/trinity-fpga/pull/592', + doesNotClaim: + 'The area cost of unrolling is real: 354 cells against 97 for the iterative scale block, 3.6x, so below about k = 4 the iterative form delivers the same rate for less. The measurement is on iCE40, which has no DSP blocks and therefore penalises the multiplier maximally, at fan-in 8 and with no board.', + doesNotClaimRu: + 'Плата за развёртку реальна: 354 ячейки против 97 у итеративного блока масштаба, в 3.6 раза, поэтому примерно до k = 4 итеративная форма даёт ту же скорость дешевле. Измерение на iCE40, где блоков DSP нет вовсе и умножитель наказан максимально, при fan-in 8 и без платы.' + }, { id: 'T48', name: 'A higher clock is not higher throughput when the cheaper operator needs more cycles',