code wiki / (root) / nx_sched_qbv.nx

nx_sched_qbv.nx

buildroot/runtime/nx_sched_qbv.nx

2944 B68 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic sched
docsdependenciesstructsconstsfunctions

about

nx_sched_qbv.nx -- the BOUNDED-LATENCY transmit scheduler (IEEE 802.1Qbv time-aware shaper, re-implemented from spec). A repeating cycle with a RESERVED critical time-slice + a GUARD BAND so best-effort traffic can never overrun into it. This gives critical traffic a PROVABLE worst- case transmit latency (<= one cycle minus the slice) -- the determinism that separates critical-grade (TSN/aerospace/medical) from best-effort. Pure/deterministic, integer-only (microseconds; Q16.16-ready), sovereign (raw syscalls only). Composes the HDR quantiles in nx_linkqual to GATE the measured worst case against this analytic bound. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_sched_qbv.nx nx_sched_qbv_test.nx

imports: nx_syscalls.nx

imported by: nx_sched_qbv_test.nx

structs

19struct QbvSchedule

consts

25const QBV_SCHED_BYTES: i64 = 32

functions

27func qbv_init(s: *QbvSchedule, cycle_us: i64, crit_start: i64, crit_len: i64, max_frame_us: i64) -> i64
called by 1: main
34func qbv_crit_end(s: *QbvSchedule) -> i64 { return s.crit_start + s.crit_len }
37func qbv_crit_open(s: *QbvSchedule, t: i64) -> i64
called by 1: main
47func qbv_be_can_start(s: *QbvSchedule, t: i64, tx: i64) -> i64
called by 1: main
58func qbv_crit_wait(s: *QbvSchedule, t: i64) -> i64
called by 1: main
66func qbv_crit_worst_bound(s: *QbvSchedule) -> i64
called by 1: main