Timing benchmark: SDIO vs USB (RTL8733BS vs 8733BU) — confirm/refute the transport-latency hypotheses

Ouverte
#235 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Calme
Stack technique
c

Piste de recherche

Start with docs/timing-accuracy.md, tests/reglat.cpp, and tests/txegress_witness.cpp; first confirm dependencies #233 and #234, then settle the SDIO access model and comparison hardware. Run the USB and SDIO measurements with the shared witness and timesync tools, including ReadTsf under RX load and TA corrections. Done means a verdict on H1–H5 and the USB/SDIO/PCIe results documented in docs/timing-accuracy.md.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

Goal

Once the RTL8733B port lands on both buses (#233 USB, #234 SDIO), the 8733BU vs 8733BS pair gives a clean apples-vs-apples experiment: same chip, same MAC, same firmware, same PHY — only the transport differs. Run it on one host with one common witness receiver to isolate the bus as the sole variable, and confirm or refute the SDIO position we predicted this session.

This extends the USB-vs-PCIe transport-latency work already in docs/timing-accuracy.md (tests/reglat.cpp, PR #228) with the SDIO middle point.

Depends on

  • #233 — RTL8733BU USB HAL merged
  • #234 — RTL8733BS SDIO transport merged

Background (measured this session)

Transport Register op Jitter (p99−p50)
USB (8822EU) ~68 µs ~64 µs
PCIe 8821CE (MMIO) ~2.2 µs ~0.08 µs
SDIO ? (predict single-digit µs) ?

Also measured: host-pushed data-frame submit-to-air jitter ~117 µs on a quiet 5 GHz channel over USB — almost entirely the USB + MAC-pipeline (CSMA minimal), i.e. the part a faster/more-deterministic bus should reduce.

Hypotheses to confirm/refute

  • H1 — register-op latency. An SDIO CMD52/53 register round-trip is single-digit µs, sitting between USB (~68 µs) and PCIe (~2.2 µs). Measure with an SDIO reglat equivalent.
  • H2 — no bulk-IN starvation. ReadTsf() is reliable during active RX on SDIO, unlike USB (where the continuous bulk-IN flood starves the control read, forcing the timesync UE to use per-frame tsfl). Measure ReadTsf success + latency under RX load, full-duplex.
  • H3 — TA actuator tightens. The closed-loop uplink timing-advance per-correction jitter drops from ~0.5–1.2 ms (USB) toward tens of µs on SDIO (the AdjustBeaconTimingFine register sequence). Re-run timesync_ta_demo over SDIO.
  • H4 — TX-egress wall unchanged. Submit-to-air jitter for host-pushed data frames stays MAC/CSMA-bound with no TX-egress timestamp — SDIO improves the submit path but does not unlock µs-precise scheduled TX (a MAC/firmware limit, transport-independent). Measure with the txegress_witness bench.
  • H5 — clean isolation. 8733BU vs 8733BS on the same host + same witness isolates the bus as the only variable, so any delta is purely transport (not chip/firmware/PHY).

Method

  1. Port both buses (#233, #234).
  2. Build an SDIO reglat + reuse tests/txegress_witness.cpp / timesync / timesync_ta_demo.sh.
  3. Run 8733BU (USB) TX and 8733BS (SDIO) TX against a common witness receiver on the same host; collect register-op, ReadTsf-under-RX, TA-jitter, and submit-to-air numbers.
  4. Fold the resulting USB | SDIO | PCIe table into docs/timing-accuracy.md.

Open questions

  • SDIO userspace access model (per #234) determines how reglat is even run — a kernel shim over sdio_func, or in-kernel measurement. This affects what "userspace latency" means for SDIO and must be settled with #234.
  • Which host provides both a USB port and an SDIO slot for the same-host comparison (an OpenIPC SoC dev board, or a desktop SDIO reader)?

Success criteria

A confirmed-or-refuted verdict on H1–H5, with a transport-latency table (register op, ReadTsf-under-RX reliability, TA per-correction jitter, submit-to-air jitter) across USB / SDIO / PCIe — the empirical basis for the transport recommendation in the LTE/5G-parity discussion.

Langage dominant
C
Étoiles
56
Forks
29
Merge moyen
3 h 43 min
PR mergées (30 j)
75

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de OpenIPC/devourer

Toutes les issues de OpenIPC/devourer

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.