Skip to content

tests: PCIe reference TX tool + robust submit-to-air transport-floor extraction#237

Merged
josephnef merged 1 commit into
masterfrom
pcie-txegress-tool
Jul 10, 2026
Merged

tests: PCIe reference TX tool + robust submit-to-air transport-floor extraction#237
josephnef merged 1 commit into
masterfrom
pcie-txegress-tool

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

Reference tooling for the transport-latency comparison — the PCIe half of the submit-to-air measurement, plus the analysis fix that makes it trustworthy on a real (busy) channel. Both live in tests/ and are not in the CMake build, so library CI is unaffected.

tests/pcie_txegress_tx.cpp — PCIe reference TX

A host-pushed data-frame TX over the PCIe transport: opens the 8821CE via PcieTransport/vfio, disables EDCCA (SetCcaMode, so the residual reflects the transport + MAC-pipeline floor, not channel load), and loops ReadTsfbuild_frame (tdma tag) → send_packet, embedding the submit stamp in each frame. Paired with the existing txegress_witness on a co-located receiver, it measures submit-to-air jitter over PCIe. Mirrors the USB timesync software master, so the numbers are directly comparable. Built standalone (g++ against a DEVOURER_PCIE=ON libdevourer.a). The reference TX tool for the SDIO-vs-USB benchmark (#235).

tests/txegress_analyze.py — robust transport-floor extraction

Adds an outlier-rejecting fit alongside the raw one. On a busy channel the MAC still defers even with EDCCA off, injecting ms-scale outliers that wreck the plain least-squares (the slope goes to an implausible ppm). Iterative 3·MAD rejection recovers the tight cluster of frames that aired immediately — the transport + MAC-pipeline floor. It now reports both raw and floor per stamp, with the crystal ppm as a sanity check.

Measured (on-air, this bench)

Transport submit-to-air floor (RMS) p2p crystal
USB (8812AU) ~93 µs 554 µs −1.2 ppm
PCIe (8821CE) ~12 µs 63 µs −1.6 ppm

PCIe is ~8× tighter — the USB floor is dominated by the USB submit-path jitter (reglat ~68 µs / ±64 µs); PCIe removes it, leaving the MAC TX pipeline (~12 µs). The fundamental TX-egress wall (per-frame air-departure control) is unchanged — see #236.

🤖 Generated with Claude Code

pcie_txegress_tx.cpp — a host-pushed data-frame TX over the PCIe transport, each
frame embedding the transmitter's ReadTsf() submit stamp (tdma tag), so the
existing txegress_witness measures submit-to-air jitter over PCIe. Mirrors the
USB timesync software master; opens the 8821CE through PcieTransport/vfio and
disables EDCCA (SetCcaMode) so the residual reflects the transport + MAC-pipeline
floor rather than channel load. Standalone (built via g++ against a
DEVOURER_PCIE=ON libdevourer.a; not in the CMake build, so CI is unaffected).
The reference TX tool for the SDIO-vs-USB benchmark (#235).

txegress_analyze.py — add a robust, outlier-rejecting fit alongside the raw one.
On a busy channel the MAC still defers even with EDCCA off, injecting ms-scale
outliers that wreck the plain least-squares (implausible ppm slope); iterative
3*MAD rejection recovers the tight cluster of frames that aired immediately — the
transport + MAC-pipeline floor. Measured on-air: USB ~93 us vs PCIe ~12 us floor
(~8x tighter), both crystals ~-1 ppm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@josephnef josephnef merged commit 11dff09 into master Jul 10, 2026
15 checks passed
@josephnef josephnef deleted the pcie-txegress-tool branch July 10, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant