tests: PCIe reference TX tool + robust submit-to-air transport-floor extraction#237
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 TXA 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 loopsReadTsf→build_frame(tdma tag) →send_packet, embedding the submit stamp in each frame. Paired with the existingtxegress_witnesson a co-located receiver, it measures submit-to-air jitter over PCIe. Mirrors the USBtimesyncsoftware master, so the numbers are directly comparable. Built standalone (g++against aDEVOURER_PCIE=ONlibdevourer.a). The reference TX tool for the SDIO-vs-USB benchmark (#235).tests/txegress_analyze.py— robust transport-floor extractionAdds 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
rawandfloorper stamp, with the crystal ppm as a sanity check.Measured (on-air, this bench)
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