How magnmaeh/programming-pret-machines works
This repository is a reproducibility suite for evaluating timing jitter and interrupt robustness across four embedded platforms. The principal workflow runs either a Lingua Franca or C benchmark on a target, optionally with periodic and sporadic interrupts, records timestamp data, and analyzes it into plots. The README also documents a parallel-reaction benchmark and a C interrupt-robustness experiment. Shared timing/workload logic and platform-specific interrupt handlers form the main internal layer. Unsampled Lingua Franca sources are represented at their existing directory; their internal wiring is not inferred.
Main entry points: common.h Work and interrupt logic · app/main.c RP2040 C run · FlexPRET/main.c FlexPRET C run · src/main.c nRF52 C run
Components 20
Benchmark workloads
- LF workloads
experiments/lf/src - FlexPRET C run
experiments/C/FlexPRET/main.c - RP2040 C run
experiments/C/RP2040/app/main.c - nRF52 C run
experiments/C/nrf52/src/main.c - RPi C run
experiments/C/RPi/main.c
Platform runtimes
- Work and interrupt logic
experiments/lib/common.h - LF logging helpers
experiments/lib/lf_common.h - FlexPRET IRQ backend
experiments/lib/FlexPRET/interrupt.c - RP2040 IRQ backend
experiments/lib/RP2040/interrupt.c - nRF52 IRQ backend
experiments/lib/nrf52/interrupt.c - RPi IRQ backend
experiments/lib/RPi/interrupt.c - RP2040 UART output
experiments/lib/RP2040/printf_custom.c
Signal and analysis
- Waveform generator
- Waveform generation
scripts/genwaves.py - Timestamp data
- Control-loop analysis
scripts/plot-control.py - Parallel comparison
scripts/plot-seqvspar.py - Data normalization
scripts/normal.py - Result figures
figs
Other components
- Experiment operator
Connections 34
- Experiment operator → LF workloads: selects benchmark
README.md - Experiment operator → FlexPRET C run: runs benchmark
README.md - Experiment operator → RP2040 C run: runs benchmark
README.md - Experiment operator → nRF52 C run: runs benchmark
README.md - Experiment operator → RPi C run: runs benchmark
README.md - Experiment operator → Waveform generation: generates signals
- Waveform generation → Waveform generator: configures waveforms
- Waveform generator → FlexPRET IRQ backend: triggers interrupts
README.md - Waveform generator → RP2040 IRQ backend: triggers interrupts
README.md - Waveform generator → nRF52 IRQ backend: triggers interrupts
README.md - Waveform generator → RPi IRQ backend: triggers interrupts
README.md - FlexPRET C run → Work and interrupt logic: runs workload
experiments/C/FlexPRET/main.c - RP2040 C run → Work and interrupt logic: runs workload
experiments/C/RP2040/app/main.c - nRF52 C run → Work and interrupt logic: runs workload
experiments/C/nrf52/src/main.c - RPi C run → Work and interrupt logic: runs workload
experiments/C/RPi/main.c - FlexPRET C run → FlexPRET IRQ backend: configures pins
- RP2040 C run → RP2040 IRQ backend: configures pins
- nRF52 C run → nRF52 IRQ backend: configures pins
- RPi C run → RPi IRQ backend: configures pins
- FlexPRET IRQ backend → Work and interrupt logic: handles interrupts
experiments/lib/FlexPRET/interrupt.c - RP2040 IRQ backend → Work and interrupt logic: handles interrupts
experiments/lib/RP2040/interrupt.c - nRF52 IRQ backend → Work and interrupt logic: handles interrupts
experiments/lib/nrf52/interrupt.c - RPi IRQ backend → Work and interrupt logic: handles interrupts
experiments/lib/RPi/interrupt.c - LF workloads → LF logging helpers: uses logging
- RP2040 C run → RP2040 UART output: prints results
experiments/C/RP2040/app/main.c - FlexPRET C run → Timestamp data: emits timestamps
experiments/C/FlexPRET/main.c - RP2040 C run → Timestamp data: emits timestamps
experiments/C/RP2040/app/main.c - nRF52 C run → Timestamp data: emits timestamps
experiments/C/nrf52/src/main.c - RPi C run → Timestamp data: emits timestamps
experiments/C/RPi/main.c - Timestamp data → Control-loop analysis: analyzes data
- Timestamp data → Parallel comparison: compares results
- Timestamp data → Data normalization: normalizes data
- Control-loop analysis → Result figures: creates plots
README.md - Parallel comparison → Result figures: creates plots
README.md