the hardware

The RP2040 has two Cortex-M0+ cores running at up to 133MHz, 264KB of SRAM, and a hardware FIFO between the cores. There's no cache, no MMU, no OS — just two cores and shared memory with spinlock protection.

the pipeline

Core 0 handles signal acquisition: reads samples from the simulated ADC, applies a FIR bandpass filter centered on the pulsar frequency band, and pushes candidate pulse timestamps to the inter-core FIFO.

Core 1 runs the detection algorithm: reads timestamps from the FIFO, applies dispersion measure correction (compensating for the frequency-dependent delay of radio pulses traveling through ionized gas), and outputs pulse events over UART.

the Rust side

The inter-core communication is the interesting part. The RP2040's SIO (Single-cycle IO) block has hardware spinlocks at fixed memory addresses. In Rust, these are wrapped in an unsafe abstraction that exposes a safe send/receive API — the unsafe code is isolated to the register access, everything above it is safe.

The entire pipeline — both cores, all the signal processing, the FIFO management — fits in about 180KB of the 264KB available. The remaining 80KB is reserved for sample buffers.