Skip to content

fpga: AX7203 board top for the WASM cell (Refs #12456) - #12594

Merged
gHashTag merged 2 commits into
ci/fpga-synth-ax7203-12411from
fpga/wasm-board-top-ax7203-12456
Oct 26, 2026
Merged

gHashTag merged 2 commits into
ci/fpga-synth-ax7203-12411from
fpga/wasm-board-top-ax7203-12456

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

What

Milestone B, part 1 of #12456: the AX7203 board top for the generated WASM cell, stacked on #12457 (milestone A, the synthesis job).

  • NEW fpga/verilog/wasm_board_ax7203_top.v (34 lines, hand-written Verilog under the label owner-approved-foreign): ports exactly rst_n, led[3:0], uart_rx, uart_tx per the pinned XDC (gf16_clean_ax7203.xdc of gHashTag/trinity-fpga at ad15ec5f56: T6 / B13 C13 D14 D15 / P20 / N15); clock from STARTUPE2 CFGMCLK through a BUFG, no board clock pin (FR-001); the cell fpga_wasm_board with en high, rxd = {7'b0, uart_rx} behind two flip-flops, uart_tx = txd[0], read-back outputs open (FR-002).
  • DELETED fpga/verilog/link_node.v (132 hand-written lines, ported earlier to specs/port/fpga/verilog/link_node.t27): the payment for the top under the foreign-budget rule (gained at most 40, lost 132).
  • One regex line in .github/workflows/fpga-build.yml: the gate of the fpga-synth-ax7203 job also fires when the top changes.

Why

#12456 needs one hand-written file because t27c gen-verilog cannot instantiate STARTUPE2 or BUFG yet (specs/fpga/die_probe.t27); every other decision of the board cell is specs/fpga/wasm_board_ax7203.t27.

Owner's approval, 2026-10-25, in the Claude Code session (translated from Russian): "Yes, write the board top wasm_board_ax7203_top.v for #12456 (up to 40 lines, under owner-approved-foreign, paid by deletions) through a Sonnet subagent on top of #12457, show the frames every run."

The exception-list entry that lets the local own-language hook accept the file is #12483 (the hook reads the list from origin/master, lefthook.yml since #7399), merged before this commit was made.

Evidence

Out of scope

Part 2 (the place-and-route job steps, which will carry Closes #12456), the chipdb cache (FR-004), the ZINV_T1 check (FR-005), any load onto the bench board (the owner's separate yes; -f never).

Refs #12456, Refs #12411, Refs #12483, Refs #9367, Refs #12387, Refs #6198.

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 26, 2026 08:34
… link_node.v (Refs #12456)

The one hand-written Verilog file of milestone B: fpga/verilog/wasm_board_ax7203_top.v
(34 lines) wraps the generated cell fpga_wasm_board for the ALINX AX7203
(xc7a200tfbg484-2). Ports exactly rst_n, led[3:0], uart_rx, uart_tx (the pinned
XDC: T6 / B13 C13 D14 D15 / P20 / N15); the clock is STARTUPE2 CFGMCLK through a
BUFG, no board clock pin; two-flop reset and UART synchronisers; the cell runs
with en high, rxd is {7'b0, uart_rx}, uart_tx is txd[0], the read-back outputs
stay open (FR-001, FR-002).

The payment under the foreign-budget rule, in the same commit because the
pre-commit hook counts each commit's staged diff on its own: fpga/verilog/link_node.v
(132 hand-written lines) is deleted; it was ported to
specs/port/fpga/verilog/link_node.t27 and nothing but docs/now prose named it.
The gate of the fpga-synth-ax7203 job also fires when the top changes (one regex
line in .github/workflows/fpga-build.yml).

Owner's approval, 2026-10-25, Claude Code session (translated from Russian):
"Yes, write the board top wasm_board_ax7203_top.v for #12456 (up to 40 lines,
under owner-approved-foreign, paid by deletions) through a Sonnet subagent on
top of #12457, show the frames every run." The exception-list entry is #12483.

Lint: yosys read_verilog -lib of cells_sim.v + cells_xtra.v and of the generated
cell, hierarchy -check, check -assert: clean, one float-parameter warning on
SIM_CCLK_FREQ. gen-verilog cannot instantiate primitives yet
(specs/fpga/die_probe.t27), so the top stays foreign until that gap closes; the
place-and-route steps of the job (FR-003 to FR-006) follow after #12457 lands.

Refs #12411
Refs #9367
Refs #12387
Refs #6198

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gHashTag gHashTag added the owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR label Oct 26, 2026
@gHashTag
gHashTag merged commit 7d19335 into ci/fpga-synth-ax7203-12411 Oct 26, 2026
30 of 32 checks passed
gHashTag added a commit that referenced this pull request Oct 26, 2026
…ceipt (Closes #12411) (#12457)

* dupe: trigit verbs write through handoff's put_lit, one copy of the loop (Closes #12419)

#12388 added put_lit to specs/tri/handoff/handoff.t27 with the same loop
body as put_s in specs/tri/trigit/verbs.t27, so the Duplicate Body Ratchet
went red on every PR: "put_lit was copied [2] and is now copied [2, 2]".

verbs.t27 already reads handoff.t27 (put_span, create_record, ...), so the
one body stays in handoff and verbs' put_s delegates to it. put_lit now
takes []const u8, like its sibling put_span: gen-rust lowered `string` to
&'static str, and verbs passes runtime byte slices. String callers get
.as_bytes() / b"..." from gen-rust; the bytes written are unchanged.

dupe_scan: 1849 bodies in 691 groups (was 1851 in 692), ledger unchanged.
test-report: handoff 12/12, verbs 17/17, handoff_view 4/4, 0 vacuous.
Seals for the three specs re-saved by t27c built at master 672aaca.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci(fpga-build): synthesise the AX7203 WASM cell with a utilisation receipt (Closes #12411)

Job fpga-synth-ax7203 after fpga-smoke: register-bit budget check (#12297),
yosys synth_xilinx -top fpga_wasm_board for xc7a200tfbg484-2 in regymm/openxc7,
artifact wasm-board-ax7203-synth with receipt.txt. Gated to PRs touching the
cell specs or this workflow. The two dead fbg676 helper scripts are removed to
keep the hand-written foreign line count net negative. Board top and
place-and-route follow in #12456.

Refs #9367
Refs #12387

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* seals: drop the stale FpgaHdmiGrab seal that #12430 re-added (Closes #12461)

Master commit b1a5857 (PR #12430) added .trinity/seals/fpga_FpgaHdmiGrab.json
as a new file sealed on 2026-10-20 against a shape of specs/fpga/hdmi_grab.t27
that #12059 split up this morning. Since then `coverage` (seal-coverage.yml)
and `spec-guards` (check_seal_currency.py) are red on master and on every PR
that merged it: one seal, all four gen_hashes stale. Master had no seal for
this spec before that commit, so the file is removed; a fresh seal from a
master-built t27c is a follow-up PR. Local check_seal_coverage.py on this
branch: OK, 3079 seals, 2966 hold, 113 known-broken listed in seal_baseline.txt.

Refs #12387

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* numeric: drop the dead braceless invariant the parser discarded in zphi_alu.t27, reseal (Closes #12464)

Master commit b1a5857 (PR #12430) added specs/numeric/zphi_alu.t27. Its
`invariant sign_conj_negation` is written in the braceless form with an `if`
statement inside the body; `parse_bdd_clauses` does not lower that shape, so
the parser restores its checkpoint and drops the whole body (61 tokens, lines
483-493). The Corpus Ratchet's `parse-no-discard` phase refuses such a file,
so every branch that carries b1a5857 is red on `Corpus Ratchet`.

The invariant was never checked, and it cannot be made live as written: with
the file's own `sign` and `conj`, sign(3, 5) = 1, conj(3, 5) = (3, -5),
sign(3, -5) = 1, so the asserted `sc == -s` is 1 == -1. The claim is not a
Z[phi] theorem either (the conjugate of 1 is 1). The block and its comment
line are deleted; nothing else in the spec changes. After the edit
`t27c parse-complete --show specs/numeric/zphi_alu.t27` reports "nothing
discarded" and `t27c check` passes.

The seal .trinity/seals/numeric_NumericZphiAlu.json is regenerated in the same
commit from a master-built t27c, so `coverage` and `spec-guards` stay green
after the spec edit. No ledger entry, no parser change.

Refs #12387

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ci(fpga-build): re-bless the census for the fpga-synth-ax7203 job (Refs #12411)

`tri census pin --gate` (the cli-tri check) refused bee2493 because the
new `fpga-synth-ax7203` job in .github/workflows/fpga-build.yml moved two
pinned censuses and the commit did not say so. The moves, each the job's
own footprint and intended:

  shell  jobs                          97 -> 98    the new job itself
  shell  run: steps                   331 -> 334   its three `run:` steps
  shell  the runner does              310 -> 313   the same three, on the
                                                   runner's shell (no container)
  quiet  named a path but not quiet   258 -> 263   five of its steps name a
                                                   path and none is `quiet`

Re-blessed with `tri census pin --bless` from a master-built `tri` whose
`--gate` reading on this tree equals CI's line for line (quiet 258 -> 263,
jobs 97 -> 98). Only tools/census/quiet.txt and tools/census/shell.txt
change; the job is as in bee2493.

Refs #12387

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(seal): re-save the T27osFrameGate seal that #12467 left stale (Closes #12486)

#12467 (e376a06, merged 2026-10-25T15:20:07Z) changed
specs/t27os/frame_gate.t27 without re-saving .trinity/seals/t27os_T27osFrameGate.json,
so tools/check_seal_currency.py reports one STALE generated-code hash on master
and every PR with base master is red on spec-guards.

Re-saved with a master-built t27c (0.5.2+672aaca7d, newer than master's last
bootstrap/src change 2b1858e) from the branch root:
tests 12/12, gen_hash_rust cebbd2f90560, gen_hash_zig 5877f763f823,
gen_hash_c d7aba556f229, gen_hash_verilog 575cb51da761, the four values
the check computes from the spec. The spec is unchanged; the seal carries
no home path.

Refs #11640

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* gates(dupes): ledger row for the same group, the renamed remainder of the groups #12458 shrank (Closes #12498)

#12458 (4f1c99a) deleted the bytes_equal, eq_s and mem_eql copies
of the byte-equality body and dropped their ledger rows. The two
copies it left, specs/tri/crypto/hex.t27:98 fn same and
specs/igla/coder/tokenizer.t27:469 fn same_bytes, were members of
those groups; tools/dupe_scan.py names a group by its alphabetically
first member, so the remainder now reads `same 2` and was in no
ledger. Neither file changed since 2026-10-23.

One row added, nothing else. Replacing both bodies with
std::mem::bytes_eq (and dropping the row again) stays with #12444.

Refs #9367, #12387, #12444

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* port(scripts): move the build_tree use inside the 29 gen_w6NN modules so the parser keeps their closing brace; reseal (Closes #12497)

#12458 (4f1c99a) replaced the local fn build_tree in gen_w631..657,
662 and 680 with `use port::scripts::gen_w_flat::build_tree;` on
line 8, before `module gen_wNNN {` on line 9. The parser takes that
form and drops the module's final `}` without an error (t27c
parse-complete --show: 1 token DISCARDED, line 66); t27c check is
blind to it, so the Corpus Ratchet reports 29 UNEXPECTED FAILURES
[parse-no-discard] on master and on every lane behind it.

The use line now sits first inside each module body; the constants,
functions and tests do not change. The 29 seals are re-saved with the
master-built t27c from the repository root. The parser defect itself
(bootstrap/) is out of scope here.

Refs #9367, #12387, #12444

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* seals(t27os): re-save the five t27os seals that #12373 added against older spec states (Closes #12509)

#12373 (squashed to 70e3073) added seals for T27osDoctor,
T27osGlassWindow, T27osLabPublish, T27osPtyServer and T27osReceiptName
that were computed on its own branch, while master's copies of the
five specs had moved on; they were stale the moment they landed, so
coverage and spec-guards are red on master and on every PR that
carries 70e3073 (FAIL: 6 seal(s) newly do not hold; STALE
generated-code hash: 6).

The five seals are re-saved with the master-built t27c 0.5.2 from
the repository root at 70e3073; the gen hashes now equal the
current= values spec-guards printed on master. Nothing else changes.
The sixth stale seal, T27osSessionStore, is carried by #12495.

Refs #9367, #12387

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* census: re-pin shell after merging master into the synth branch (Refs #12411)

The synth job pinned +1 job, +3 run steps, +3 runner-named steps over
4f1c99a; master #12515 pinned the release-leg workflow (+1 file,
+1 job, +2 steps, +2 runner-named) over the same base. The merge keeps
master file, so the sum is re-blessed here: jobs 98 -> 99, run steps
333 -> 336, runner-named 312 -> 315. No workflow changes here.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ci(fpga-synth): fail the pull step when the image never arrives; stat -tech xilinx for the LC line (Refs #12411)

Two in-place lines in the synth job, after the t27-bees review of 2f88fd1:

- the six-attempt docker pull loop ended with the status of its last sleep, so six failed pulls passed the step and the yosys step died with "image not found"; the step now checks the image after the loop and fails with its own message.
- stat without -tech xilinx prints no "Estimated number of LCs" line, so the receipt grep was empty by construction; stat -tech xilinx prints it with the same per-cell table.

The other three remarks do not apply to the generated cell: gen-verilog emits no comma-separated reg declarations (0 in the artifact) and writes module at column 1; a flattened stat prints each cell type once.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* census(quiet): re-bless, named-a-path-but-not-quiet 263 -> 264 for the image check in the synth job (Refs #12411)

The quiet census moved by one line in 1b10fe5: the check that follows the
six-attempt image pull loop in the fpga-synth-ax7203 job names
regymm/openxc7:latest and is counted as "named a path but not quiet" (its
stdout goes to /dev/null, but the census reads the line, not the redirect).
cli-tri on that head: 889 tests passed, the gate step alone failed with
"quiet moved 263 -> 264". Nothing else in tools/census moves (fetches and
shell unchanged, tri census explain).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fpga: AX7203 board top for the WASM cell, paid by deleting the ported link_node.v (Refs #12456) (#12594)

The one hand-written Verilog file of milestone B: fpga/verilog/wasm_board_ax7203_top.v
(34 lines) wraps the generated cell fpga_wasm_board for the ALINX AX7203
(xc7a200tfbg484-2). Ports exactly rst_n, led[3:0], uart_rx, uart_tx (the pinned
XDC: T6 / B13 C13 D14 D15 / P20 / N15); the clock is STARTUPE2 CFGMCLK through a
BUFG, no board clock pin; two-flop reset and UART synchronisers; the cell runs
with en high, rxd is {7'b0, uart_rx}, uart_tx is txd[0], the read-back outputs
stay open (FR-001, FR-002).

The payment under the foreign-budget rule, in the same commit because the
pre-commit hook counts each commit's staged diff on its own: fpga/verilog/link_node.v
(132 hand-written lines) is deleted; it was ported to
specs/port/fpga/verilog/link_node.t27 and nothing but docs/now prose named it.
The gate of the fpga-synth-ax7203 job also fires when the top changes (one regex
line in .github/workflows/fpga-build.yml).

Owner's approval, 2026-10-25, Claude Code session (translated from Russian):
"Yes, write the board top wasm_board_ax7203_top.v for #12456 (up to 40 lines,
under owner-approved-foreign, paid by deletions) through a Sonnet subagent on
top of #12457, show the frames every run." The exception-list entry is #12483.

Lint: yosys read_verilog -lib of cells_sim.v + cells_xtra.v and of the generated
cell, hierarchy -check, check -assert: clean, one float-parameter warning on
SIM_CCLK_FREQ. gen-verilog cannot instantiate primitives yet
(specs/fpga/die_probe.t27), so the top stays foreign until that gap closes; the
place-and-route steps of the job (FR-003 to FR-006) follow after #12457 lands.

Refs #12411
Refs #9367
Refs #12387
Refs #6198

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag deleted the fpga/wasm-board-top-ax7203-12456 branch October 26, 2026 03:40
@gHashTag gHashTag added the doom-ax7203 DOOM on the AX7203: every issue of the WASM board route (epic #12387) label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doom-ax7203 DOOM on the AX7203: every issue of the WASM board route (epic #12387) owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant