Skip to content

fpga: the bench board is an ALINX AX7203, and a t27 Ethernet beacon for it (Closes #7788) - #7802

Merged
gHashTag merged 2 commits into
masterfrom
claude/eth-beacon-ax7203
Oct 8, 2026
Merged

gHashTag merged 2 commits into
masterfrom
claude/eth-beacon-ax7203

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Closes #7788

The board is an ALINX AX7203

A USB camera on the bench read "ALINX" off the PCB. The AX7203 gf8 bitstream from gHashTag/trinity-fpga then answered HW RESULT: 512/512 bit-exact (fails=0) over the AX7203 UART, clocked from the AX7203 oscillator on R4/T4. Our notes had called the board a QMTech Wukong (xc7a200tfgg676). It is xc7a200tfbg484-2: the same die, so IDCODE 0x3636093 never told them apart.

  • JTAG-only verdicts stand, because those designs touch no package pin.
  • Pin-level probes written for the Wukong read the wrong pins.
  • fpga/HARDWARE_SSOT.md gets a dated section with the evidence and the AX7203 pins. CLAUDE.md points at it.

Specs

  • specs/fpga/eth_beacon.t27 (module EthBeacon). Sends one UDP broadcast, T27E plus a frame counter, every 2^24 cycles at 125 MHz on both KSZ9031 PHYs. It also:
    • holds the PHY reset;
    • shows the RGMII in-band link and speed of each PHY on the LEDs, with a heartbeat;
    • builds the frame for 125 MHz.
    • 9/9 tests, 0 vacuous.
  • specs/fpga/rgmii_sniff.t27 (module RgmiiSniff). Counts frames, in-band status and the frame head in a PHY's receive clock domain. Read over JTAG, it found the link: PHY 2, 1000 Mb/s, full duplex. 3/3 tests.
  • Both are sealed.

Silicon, 2026-10-08

  • Timing: post-route 179.69 MHz against a 125 MHz requirement on xc7a200tfbg484-2. Earlier versions reached 64.2 and then 94.6 MHz before the frame was rebuilt as a flat table.
  • A Mac on the same LAN received the board's datagrams from 192.168.1.227: 816 of 932 and 110 of 119 frames. It was on Wi-Fi, where broadcast is not retransmitted.
  • Frames arrived at 7.45 per second, which is 125 MHz / 2^24.
  • The OS accepted every frame it received, so the FCS, the IPv4 checksum and the UDP header are right.
  • The camera shows the PHY 2 link and gigabit LEDs lit and the heartbeat blinking.

Follows in this PR

The wrapper fpga/verilog/eth_beacon_top.v (IBUFDS, PLLE2_ADV, BUFG, ODDR; 40 lines) and eth_beacon_top.xdc (34 lines). They are pushed after their owner-approved exception, #7794, is on master, because the local hook reads that list from origin/master.

Not done

  • t27c silicon still targets fbg676. The fbg484 flow was run by hand: yosys, nextpnr-xilinx with the fbg484 chipdb, fasm2frames and xc7frames2bit.
  • The beacon only transmits: no ARP, no ping.
  • Loss has not been measured on a wired receiver.

🤖 Generated with Claude Code

…or it (Closes #7788)

A USB camera on the bench read "ALINX" off the PCB on 2026-10-08. The board
our notes called a QMTech Wukong (xc7a200tfgg676) is an ALINX AX7203
(xc7a200tfbg484-2): the same die, so IDCODE 0x3636093 never told them apart.
The AX7203 gf8 bitstream from gHashTag/trinity-fpga answered
HW RESULT: 512/512 bit-exact over the AX7203 UART (N15, 160000 baud), clocked
from R4/T4. Every JTAG-only verdict stands (those designs touch no package
pin); every pin-level probe written for the Wukong read the wrong pins.
fpga/HARDWARE_SSOT.md gets a dated section with the evidence and the AX7203
pins, and CLAUDE.md points at it.

specs/fpga/eth_beacon.t27 (module EthBeacon, was WukongEthBeacon): one UDP
broadcast 192.168.1.227 -> 192.168.1.255:27027 ("T27E" + frame counter) every
2^24 cycles at 125 MHz, on both KSZ9031 PHYs. New for the AX7203: the PHY
reset held 2^21 cycles; RGMII in-band status (link, speed) of both PHYs and a
frame heartbeat on the four user LEDs, so the camera reads the link; and a
frame built for 125 MHz -- an 8-bit position, the next byte fetched a clock
ahead into a register the CRC reads, and frame_byte as a table on the
absolute position with no index arithmetic. Post-route on xc7a200tfbg484-2:
64.2 MHz with 32-bit index arithmetic, 94.6 with the prefetch, 179.7 with the
flat table (the FCS test held the bytes fixed through every rewrite).
t27c test-report: 9/9, 0 vacuous.

specs/fpga/rgmii_sniff.t27 (module RgmiiSniff): frames, in-band status and the
first eight nibbles of the latest frame, counted in a PHY's receive clock
domain. Read over JTAG USER3 it found the link: PHY 1 RXC 25 MHz and nothing,
PHY 2 RXC 125 MHz, in-band 0xD (link, 1000 Mb/s, full duplex), preamble
0x55555555. 3/3 tests.

On silicon, 2026-10-08: the Mac at 192.168.1.29 received the board's T27E
datagrams from 192.168.1.227, 816 of 932 and 110 of 119 frames (over Wi-Fi,
where broadcast is never retransmitted), at 7.45 frames/s = 125 MHz / 2^24.
The camera shows PHY 2 link and gigabit lit and the heartbeat blinking.

The wrapper (IBUFDS, PLLE2_ADV, BUFG, ODDR; 40 lines) and the XDC (34 lines)
follow in the next commit, once their owner-approved exception (#7794) is on
master.

Closes #7788

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

fpga/verilog/eth_beacon_top.v (40 lines, owner-approved-foreign, #7794 on
master): IBUFDS for the 200 MHz oscillator on R4/T4, PLLE2_ADV for 125 MHz and
a 90-degree copy, two BUFG, and ODDR cells that put each byte of
specs/fpga/eth_beacon.t27 on RGMII as two nibbles (the high nibble held one
byte back, because ODDR takes D2 on the falling edge) and forward the shifted
clock as TXC. Both PHYs get the same frames. The user LEDs light on a low
output, so the wrapper inverts them.

fpga/verilog/eth_beacon_top.xdc (34 lines): the clock, both PHYs' RGMII pins
and resets, and the four LEDs, one port per line (nextpnr's XDC reader does not
expand [*]), from the ALINX AX7103/AX7203 manual; bank 16 at LVCMOS33.

This is the build that ran on 2026-10-08: post-route 179.69 MHz at 125 MHz on
xc7a200tfbg484-2, and the Mac received the board's T27E datagrams.

Closes #7788

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 8, 2026 12:24
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-08 12:27:36 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 44
PRs with All Checks Green 6
READY 2
FAILING 44
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 44 + 0 + 0 = 46, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=39fa3908f9fd != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-08 12:40:19 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 43
PRs with All Checks Green 7
READY 2
FAILING 43
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 43 + 0 + 0 = 45, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=39fa3908f9fd != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag

gHashTag commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

The one red check, t27b-native-ratchet ("ratchet verdict red"), is red on master too: runs on 579bc55 and 1f2448e fail the same way. This PR touches no t27b code, only two fpga specs, their seals, the wrapper and XDC, and docs, so the failure is not this PR's. No fix exists in this PR's scope. The check is not required, and #7739 merged with it red.

@gHashTag
gHashTag merged commit e6e8257 into master Oct 8, 2026
29 of 30 checks passed
gHashTag pushed a commit that referenced this pull request Oct 8, 2026
Master moved (#7799 and #7802, neither touching t27b); the merge is clean.
It is made on e6e8257 because the t27b lab is receipting that master,
so the lane receipt can compare this head against it. The ledger keeps
only this PR's two rows (zig_test_shadowing blocked -> pass,
shadow_module_var new pass) on master's.

Closes #7668

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag pushed a commit that referenced this pull request Oct 8, 2026
Brings master e6e8257 (t27-basics lessons #7799, AX7203 Ethernet beacon
#7802) in. No conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
gHashTag pushed a commit that referenced this pull request Oct 8, 2026
…) into the buses-course specs (Refs #7625)

Brings master e6e8257 in. No conflict. Master adds specs/fpga/eth_beacon.t27
and rgmii_sniff.t27 beside this branch's eth_crc.t27 and rgmii.t27; the
duplicate-body scan, the elaboration ratchet and the seal gates are re-run
on the merged tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
gHashTag pushed a commit that referenced this pull request Oct 8, 2026
…ion baseline at 0 errors (Refs #7625)

Master e6e8257 (#7802) added specs/fpga/eth_beacon.t27 and
rgmii_sniff.t27 without baseline rows, so `python3
tools/check_elab_ratchet.py` fails on master itself ("NEW eth_beacon: 0
errors, not in baseline", same for rgmii_sniff), and fpga-build runs on
this PR because it touches specs/fpga/. `--update-baseline` adds exactly
those two rows, each at 0 errors (the strictest a row can be); no other
row moves, total 177 -> 177. check_elab_ratchet.py: OK; --self-check and
check_gate_preconditions.py pass; yosys read_verilog + hierarchy: 41/41.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

fpga: Ethernet beacon on the ALINX AX7203 bench (the board is not a Wukong)

2 participants