@@ -471,29 +471,39 @@ every simulation artifact is deleted before the run and required after it,
471471and simulator exit codes are checked. We adopted this discipline after a
472472repository reorganization silently disconnected an earlier cross-check.
473473
474- Tables 3 and 4 summarize what is proven and what is validated (all
475- reproduced by CI on every push).
474+ Figure 2 draws the resulting boundary at a glance; Appendix B tabulates
475+ every obligation with its method and scope. All of it is reproduced by CI
476+ on every push.
476477
477- ** Table 3. Proven properties (all inputs in scope).**
478-
479- | property | method | scope |
480- | ---| ---| ---|
481- | K-RED unit == k^F·a·b mod q | z3, divider-free congruence | full 28-bit domain |
482- | fold7 == 7·x mod q | z3, congruence | full domain (x<q) |
483- | ` tf_rom_fold ` ≡ shipped ` tf_ROM ` | SymbiYosys miter | every address, any REN |
484- | butterfly (NTT/INTT) == spec | SbY compositional, domain-faithful | all inputs, latency-exact |
485- | own-FSM control safety (§5) | SymbiYosys k-induction, datapath stubbed | arbitrary host behaviour, both modes |
486- | host load reduced mod q | k-induction assert, h_din unconstrained | all 16384 words, symbolic |
487- | reset / power-up-X / single-clock | SymbiYosys + netlist audit | structural |
488- | non-vacuity | 8 RTL mutations | each kills its proof |
489-
490- ** Table 4. Validated by simulation.**
491-
492- | property | method | scope |
493- | ---| ---| ---|
494- | full transform INTT(NTT(x))=x | iverilog simulation | random vectors, N=1024 |
495- | own core NTT / INTT vs independent golden | iverilog + golden, bijectivity | multi-vector incl. raw ≥ q, fresh dumps |
496- | generalization (Kyber q=3329) | exhaustive + iverilog | all z<q², generated RTL |
478+ ``` {=latex}
479+ \begin{figure}[!t]
480+ \centering
481+ \begin{tikzpicture}[font=\scriptsize,
482+ zone/.style={draw, rounded corners=1.5pt, align=left, inner sep=5pt,
483+ text width=0.88\columnwidth}]
484+ \node[zone, fill=black!14] (p) {\textbf{Proven for all inputs in scope}
485+ (z3 + SymbiYosys)\\[1pt]
486+ K-RED unit, full 28-bit domain \; $\cdot$ \; fold7 \; $\cdot$ \;
487+ ROM $\equiv$ shipped table, every address \; $\cdot$ \;
488+ butterfly, latency-exact, both modes \; $\cdot$ \;
489+ FSM control invariants (k-induction, any host behaviour) \; $\cdot$ \;
490+ host load $< q$ \; $\cdot$ \; 8-mutation non-vacuity};
491+ \node[zone, fill=black!5, below=2mm of p] (s)
492+ {\textbf{Validated by simulation} (freshness-enforced, independent
493+ goldens)\\[1pt]
494+ composed $N{=}1024$ transform \; $\cdot$ \; own-core NTT/INTT
495+ round-trips \; $\cdot$ \; generated Kyber RTL};
496+ \node[zone, below=2mm of s] (o) {\textbf{Outside scope:}
497+ vendor timing \; $\cdot$ \; physical boards \; $\cdot$ \;
498+ power/EM side channels};
499+ \end{tikzpicture}
500+ \caption{The verification boundary. Everything in the top zone is proven
501+ for every input in its stated scope; the middle zone is exercised by
502+ freshness-enforced simulation against independent goldens; the bottom
503+ zone is explicitly out of scope (\S8).}
504+ \label{fig:boundary}
505+ \end{figure}
506+ ```
497507
498508The harnesses themselves are reusable: each is a self-contained SymbiYosys
499509or Python file parameterized per module, and the three disciplines they
@@ -511,17 +521,45 @@ xc7a100t) counts; the latter two are what the claims rest on. Only
511521vendor (Vivado) confirmation and physical on-board execution remain
512522outside CI (§8).
513523
514- Table 5 gives per-module FPGA primitives.
524+ Table 3 gives the measured resources, per module and for the whole core.
525+
526+ ** Table 3. FPGA resources, per module and whole core (Artix-7, ` synth_xilinx ` ).**
527+
528+ | | LUT | FF | ** DSP48** | RAMB18 | LTP |
529+ | ---| ---| ---| ---| ---| ---|
530+ | ` modular_mul ` (Barrett) → ` modular_mul_kred ` | 29 → 83 | 101 → ** 74** | ** 3 → 1** | — | 17 → 21 |
531+ | ` compact_bf ` (ref) → ` compact_bf_v2 ` | 158 → 231 | 297 → 270 | ** 3 → 1** | — | — |
532+ | ` tf_ROM ` → ` tf_rom_fold ` | 241 → ** 192** | 14 → 15 | 0 → 0 | — | 7 → 26 |
533+ | whole core: reference ` top_poly_mul ` | 784 | 582 | ** 3** | 2 | — |
534+ | whole core: proposed ` top_poly_mul_v2 ` | 824 | 502 | ** 1** | 2 | — |
515535
516- ** Table 5. FPGA primitives (Artix-7 target).**
536+ Figure 3 is the summary: what the retrofit changes, normalized to the
537+ reference core. These numbers support the following observations.
517538
518- | block | LUT | FF | ** DSP48** | logic depth (LTP) |
519- | ---| ---| ---| ---| ---|
520- | ` modular_mul ` (Barrett) → ` modular_mul_kred ` | 29 → 83 | 101 → ** 74** | ** 3 → 1** | 17 → 21 |
521- | ` compact_bf ` (ref) → ` compact_bf_v2 ` | 158 → 231 | 297 → 270 | ** 3 → 1** | — |
522- | ` tf_ROM ` → ` tf_rom_fold ` | 241 → ** 192** | 14 → 15 | 0 → 0 | 7 → 26 |
539+ ``` {=latex}
540+ \begin{figure}[!t]
541+ \centering
542+ \resizebox{\columnwidth}{!}{%
543+ \begin{tikzpicture}[font=\scriptsize]
544+ \newcommand{\perfbar}[4]{%
545+ \draw[fill=black!8, draw=black!30] (0,#1) rectangle (5.2,#1+0.34);
546+ \draw[fill=black!45, draw=black!55] (0,#1) rectangle (#2,#1+0.34);
547+ \node[anchor=east] at (-0.12,#1+0.17) {#3};
548+ \node[anchor=west] at (5.32,#1+0.17) {#4};}
549+ \perfbar{2.55}{1.73}{DSP48 per butterfly}{33\% (3 $\to$ 1)}
550+ \perfbar{1.85}{2.60}{stored twiddle bits}{50\%}
551+ \perfbar{1.15}{4.13}{ENS area score}{79\% (969 $\to$ 769)}
552+ \perfbar{0.45}{5.16}{whole-core Fmax}{99\% ($\sim$137 $\to$ $\sim$136 MHz)}
553+ \draw[black!50, dashed] (5.2,0.3) -- (5.2,3.05)
554+ node[above, black, font=\scriptsize] {reference = 100\%};
555+ \end{tikzpicture}}
556+ \caption{The streaming retrofit vs the reference core, normalized to the
557+ reference (100\%, dashed). Lower is better for the first three bars;
558+ Fmax is retained. Same function, inverse transform corrected (\S3).}
559+ \label{fig:summary}
560+ \end{figure}
561+ ```
523562
524- These numbers support the following observations.
525563
526564- The headline result is the DSP (the FPGA's dedicated multiplier block)
527565 count: 3 → 1 per butterfly (−67%),
@@ -552,16 +590,9 @@ sustains) cost is small (see the post-route Fmax
552590paragraph below); a pipelined fold7 would remove the ROM-read depth at
553591+1 latency.
554592
555- ** Whole-core area.** Table 6 synthesizes the entire core (one butterfly +
556- two conflict-free banks + twiddle ROM + address generators + FSM),
557- reference vs proposed, on 7-series primitives.
558-
559- ** Table 6. Whole-core area, reference vs proposed (7-series primitives).**
560-
561- | core | LUT | FF | ** DSP48** | RAMB18 |
562- | ---| ---| ---| ---| ---|
563- | reference ` top_poly_mul ` | 784 | 582 | ** 3** | 2 |
564- | proposed ` top_poly_mul_v2 ` | 824 | 502 | ** 1** | 2 |
593+ ** Whole-core area.** The last two rows of Table 3 synthesize the entire
594+ core (one butterfly + two conflict-free banks + twiddle ROM + address
595+ generators + FSM), reference vs proposed.
565596
566597At the core level the DSP count falls 3→1 (scaling ×d with parallel
567598butterflies), FF falls 14%, and LUT rises 5% (the K-RED DSP→LUT trade
@@ -617,9 +648,9 @@ target q = 12289 and both use Barrett with full twiddle ROMs; neither of
617648our contributions appears in them (the two 'this work' rows are the two
618649instantiations of the one construction: the streaming retrofit carries the
619650like-for-like comparison, the own-FSM core is the design point that
620- executes end-to-end). Table 7 shows the comparison.
651+ executes end-to-end). Table 4 shows the comparison.
621652
622- ** Table 7 . Comparison with Falcon-NTT accelerators (Artix-7).**
653+ ** Table 4 . Comparison with Falcon-NTT accelerators (Artix-7).**
623654
624655| design | mult/bf | DSP | Fmax | NTT-1024 | ENS† | verified |
625656| ---| ---| ---| ---| ---| ---| ---|
@@ -721,7 +752,7 @@ RTL. One iteration of the loop: (1) formally verify the current design;
721752(2) regenerate the 3D model from the verified source; (3) show rendered
722753screenshots to a vision-language model, which critiques the scene and
723754looks for structure; (4) turn any observation into a concrete design
724- change; (5) verify the change before accepting it. Figure 2 shows the
755+ change; (5) verify the change before accepting it. Figure 4 shows the
725756model at five points along the loop's 37 revisions. The K-RED retrofit
726757entered at step (4) as a conventional optimization; the ψ-fold was
727758noticed at step (3): once K-RED had shrunk the arithmetic, the twiddle
@@ -821,9 +852,9 @@ chip's physical fabric — is too heavy for it):
821852- ** Bitstream** (§6): ` ntt-core/bit.sh ` runs the full Vivado-free Basys-3
822853 flow, timing-gated (every reported clock ≥ 50 MHz).
823854
824- Table 8 maps the liftable deliverables.
855+ Table 5 maps the liftable deliverables.
825856
826- ** Table 8 . What a hardware team can lift directly.**
857+ ** Table 5 . What a hardware team can lift directly.**
827858
828859| deliverable | file | contract | certified by |
829860| ---| ---| ---| ---|
@@ -880,6 +911,26 @@ $\psi \cdot ((k^F)^{-1} w[j]) = (k^F)^{-1} w[N/2+j]$, and the
880911k^F-scaling butterfly restores exactly the reference transform.
881912* Machine check:* ` rom_fold_math.py ` , ` run_stream.py ` (end-to-end).
882913
914+ # Appendix B: verification obligations
915+
916+ The detail behind Figure 2; every row is re-run by CI on each push.
917+
918+ ** Table 6. Verification obligations, methods and scopes.**
919+
920+ | property | method | scope |
921+ | ---| ---| ---|
922+ | K-RED unit == k^F·a·b mod q | z3, divider-free congruence | full 28-bit domain |
923+ | fold7 == 7·x mod q | z3, congruence | full domain (x<q) |
924+ | ` tf_rom_fold ` ≡ shipped ` tf_ROM ` | SymbiYosys miter | every address, any REN |
925+ | butterfly (NTT/INTT) == spec | SbY compositional, domain-faithful | all inputs, latency-exact |
926+ | own-FSM control safety (§5) | SymbiYosys k-induction, datapath stubbed | arbitrary host behaviour, both modes |
927+ | host load reduced mod q | k-induction assert, h_din unconstrained | all 16384 words, symbolic |
928+ | reset / power-up-X / single-clock | SymbiYosys + netlist audit | structural |
929+ | non-vacuity | 8 RTL mutations | each kills its proof |
930+ | full transform INTT(NTT(x))=x | iverilog simulation | random vectors, N=1024 |
931+ | own core NTT / INTT vs independent golden | iverilog + golden, bijectivity | multi-vector incl. raw ≥ q, fresh dumps |
932+ | generalization (Kyber q=3329) | exhaustive + iverilog | all z<q², generated RTL |
933+
883934# References
884935
885936Machine-readable entries in ` references.bib ` . Principal citations:
0 commit comments