tpt-spectrumos
RustA Rust-native, deterministic OpenRAN 5G/6G baseband stack — const-generic SIMD FFT, LDPC/Polar FEC, OFDM PHY, MAC scheduling/HARQ, and eCPRI fronthaul, built for PREEMPT_RT
Languages
TPT-SpectrumOS
A Rust-native, OpenRAN software-defined radio (SDR) baseband stack.
TPT-SpectrumOS turns a standard multi-core Linux server into a high-performance 5G/6G gNodeB baseband stack: it ingests raw I/Q samples over fronthaul (eCPRI / IEEE 1914.3), runs the PHY (FFT, channel estimation, FEC, OFDM) in highly optimized, const-generic Rust with SIMD acceleration, and handles MAC scheduling, HARQ, and multiplexing — all with deterministic, jitter-free timing suitable for PREEMPT_RT.
This workspace is the v0.1.0 foundation: ten crates implementing the core
vocabulary, DSP, FEC, PHY, MAC, fronthaul, real-time, and hardware-offload
layers, plus an internal testkit and a facade crate. See spec.txt
for the product spec and TODO.md for the milestone plan.
Workspace layout
| Crate | Responsibility |
|---|---|
tpt-spectrumos-core | Shared types: I/Q samples, errors, numerology, timestamps |
tpt-spectrumos-dsp | Radix-2 FFT (scalar + AVX2/AVX-512), windowing, channel estimation |
tpt-spectrumos-fec | LDPC (min-sum BP) and Polar (successive-cancellation) codecs |
tpt-spectrumos-phy | QAM modulation, OFDM pipeline, resource grid |
tpt-spectrumos-mac | Scheduling, HARQ, multiplexing |
tpt-spectrumos-fronthaul | eCPRI 1.2 + IEEE 1914.3 (RoE) framing |
tpt-spectrumos-rt | CPU pinning, memory locking, runtime construction |
tpt-spectrumos-hal | Software FEC/FFT offload backend (FPGA deferred) |
tpt-spectrumos-testkit | Test-only DFT oracle, AWGN, known channels (unpublished) |
tpt-spectrumos (facade) | Re-exports and the synthetic_loopback example |
Building and testing
cargo build --workspace
cargo test --workspace
cargo clippy --workspace --all-targets
cargo fmt --check
The DSP SIMD backends require x86_64 with AVX2 (and AVX-512 behind the
avx512 feature). On non-x86 targets the scalar backend is used.
Architecture
graph LR
subgraph Fronthaul
eCPRI["ecpri<br/>eCPRI 1.2"]
RoE["roe<br/>IEEE 1914.3"]
end
subgraph PHY
OFDM["ofdm<br/>OFDM pipeline"]
MOD["modulation<br/>QPSK / 16-QAM"]
GRID["resource_grid"]
end
subgraph DSP
FFT["fft<br/>Radix-2 / AVX2 / AVX-512"]
CE["channel_estimation"]
WIN["window"]
end
subgraph FEC
LDPC["ldpc<br/>min-sum BP"]
POLAR["polar<br/>SC decode"]
end
subgraph MAC
SCHED["scheduler<br/>round-robin"]
HARQ["harq<br/>state machine"]
MUX["multiplexing<br/>multi-user"]
end
subgraph HAL
SW["SoftwareOffload<br/>fft / ldpc"]
FPGA["FPGA (stub)"]
end
RT["rt<br/>pin / lock / runtime"]
eCPRI --> OFDM
RoE --> OFDM
OFDM --> FFT
OFDM --> LDPC
OFDM --> MOD
MOD --> GRID
FFT --> SW
LDPC --> SW
OFDM <--> SCHED
SCHED --> HARQ
SCHED --> MUX
RT -.-> OFDM
RT -.-> SCHED
Example
cargo run --example synthetic_loopback
Generates synthetic bits → FEC + QAM + OFDM modulate → frame over eCPRI → de-frame → demodulate → compare. Runs over an ideal (noiseless) channel and asserts a bit-exact round trip.
Unsafe policy
unsafe is confined to the innermost DSP loops (SIMD intrinsics) in dsp,
hal, and rt, each wrapped in a safe API and preceded by a // SAFETY:
comment. Everywhere else the workspace denies unsafe_code.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.