Skip to content

[P0] A+C+N: LUT-only gf16_mul + Wallace-tree dot4 + Yosys EQY t27c↔src #4

@gHashTag

Description

@gHashTag

P0: CROWN-ASIC architecture upgrade — A+C+N block

Anchor: φ²+φ⁻²=3 · R5-honest · Defense 2026-06-15
Target submission: TTSKY26c (TTSKY26a deadline 2026-05-11 missed)
Scope: 3 changes, one PR, zero floorplan impact, preserves G0–G2 GREEN status.


Change A — Eliminate the last legacy * (R-SI-1 absolute)

File: src/gf16_mul.v:30
Problem: One residual Verilog * operator violates the spirit of R-SI-1 (zero new multipliers, ternary/XOR-popcount only).
Fix: Replace with a 16×16 → 4-bit ROM lookup-table (256 entries × 4 bit = 1024 bit ≈ 150 cells on SKY130).
Acceptance:

  • grep -n '\*' src/gf16_mul.v returns zero hits (excluding comments)
  • Existing tb_gf16_mul.v passes 100/100 vectors against the new LUT
  • OpenLane2 cell count for the module ≤ pre-change baseline (LUT replaces * cells)
  • R-SI-1 status flips from "one legacy" → "absolute" in docs/INVARIANTS.md

Change C — Wallace-tree popcount in gf16_dot4.v (+60% f_max)

File: src/gf16_dot4.v
Problem: Linear XOR chain has O(N) depth → caps f_max at ~50 MHz.
Fix: Replace XOR chain with a Wallace-tree popcount (O(log N) depth).
Acceptance:

  • Combinational depth (Yosys stat -tech sky130) ≤ 0.6× baseline
  • OpenLane2 reports f_max ≥ 75 MHz (target 80 MHz, accept 75)
  • Cell delta ≤ ±5 % vs baseline (no significant area regression)
  • All tb_gf16_dot4.v vectors pass

Change N — Yosys EQY formal equivalence: t27c-generated RTL ↔ hand-written src/*.v

New file: scripts/eqy_check.sh
Problem: Coq proves t27 spec correct; t27c emits Verilog; but src/*.v is hand-written. Today there is no formal proof that the hand-written RTL is equivalent to the t27c output. This is the missing link from "Coq-proven spec" to "silicon".
Fix: Wire Yosys EQY (Equivalence checking, open-source) between:

  • build/t27c/*.v (output of t27c gen-verilog from .t27/.tri specs)
  • src/*.v (hand-written modules under audit)
    Acceptance:
  • scripts/eqy_check.sh exits 0 for gf16_mul, gf16_add, gf16_dot4, trinity_gf16_tile
  • CI workflow .github/workflows/eqy.yml blocks merge on failure
  • docs/EQY_CHECK.md documents the t27c version pinned + how to reproduce
  • Evidence JSON written to evidence/eqy_<sha>.json per run (R5-honest)

Why this PR first

  1. No floorplan change → does not invalidate G0 (PR feat: Trinity v0 RTL mesh fabric (CPU-less, GF16 dot4 tiles) #2, cfc234e) DRC/LVS work
  2. Preserves G1/G2/G4 GREEN sim status (changes are internal to combinational paths + new script)
  3. Unblocks TTSKY26c: R-SI-1 absolute is a hard requirement for the silicon validation chapter (PhD Glava 35)
  4. Closes the Coq→silicon gap (Change N) — strongest PhD defense claim

Acceptance gate for the whole PR

  • All three sub-changes meet their per-change criteria above
  • info.yaml unchanged (tiles: 2x2, top_module tt_um_ghtag_trinity_gf16)
  • No new external IP, no proprietary cells, Apache-2.0 (R-SI-5)
  • NASA mini-report appended as docs/PR_AC_N_NASA.md with 12-probe table
  • R5 evidence JSON in evidence/ for each acceptance bullet

Out of scope (will be P1 / P2 issues)

  • D — Torus 4×4 router (P1)
  • G — Poseidon receipt hash (P1)
  • K — eFPGA patch tile (P1)
  • R — Coq-extracted scheduler (P2, PhD hero claim)
  • P — Sparse zero-skip (P2)

φ²+φ⁻²=3 · CROWN-ASIC · TRINITY · R5-HONEST


Parent: #3 (CROWN-ASIC architecture roadmap)

Metadata

Metadata

Assignees

No one assigned

    Labels

    audit-blockedAcceptance criteria audited; deferred to a later wave with documented fix pathdeferred-ttsky26cDeferred to TTSKY26c submission window

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions