Skip to main content

heterogeneous-offload

:::warning [UNTESTED] — v0.6 paper-correct Builds the same V2N101 toolchain as rpmsg-v2n. HiL bring-up on V2N gates on v0.8. :::

The flagship "why heterogeneous compute?" demo on E1M-V2N101. The Cortex-A55 cluster runs Yocto Linux + a 1024-sample audio producer (or a synthetic sine wave when no codec is attached). It calls alp_rpc_call(..., "fft", ...) over RPMsg to delegate the FFT to its Cortex-M33-SM peer, which runs CMSIS-DSP with deterministic timing. The A55 then identifies the dominant frequency from the magnitude spectrum.

Source: examples/heterogeneous-offload/.

Why it matters

Each core is good at something the other isn't:

  • M-class cores have CMSIS-DSP, hardware FPU, predictable interrupt latency. They run an FFT in a known cycle budget.
  • A-class cores have the Linux audio plumbing (ALSA, libcamera, PulseAudio, gstreamer) and the dynamic memory layout customers expect from "Linux".

A best-of-both-worlds product offloads time-critical numeric kernels to the M-class peer while keeping the user-space stack on Linux. alp_rpc_call is the synchronous request/response primitive that makes that pattern ergonomic.

board.yaml

som:
sku: E1M-V2N101
hw_rev: r1

preset: e1m-x-evk

cores:
a55_cluster:
# os: omitted → topology default (a55_cluster → yocto).
app: ./linux
image: alp-image-edge
libraries: [mbedtls, nlohmann_json]
m33_sm:
# os: omitted → topology default (m33_sm → zephyr).
app: ./m33_sm
peripherals: [adc, i2c, gpio]
libraries: [cmsis_dsp] # CMSIS-DSP carries the FFT we offload

ipc:
- kind: rpmsg
endpoints: [a55_cluster, m33_sm]
carve_out_kb: 512 # sized for a 1024-sample float buffer (4 KiB) + framing
name: alp_default_rpmsg

diagnostics:
log_level: info

Wire protocol

A55 (Yocto) ──"fft"(float[1024] req)──▶ M33-SM (Zephyr)

├─ arm_rfft_fast_f32(...)
├─ arm_cmplx_mag_f32(...)

A55 (Yocto) ◀──"fft"(float[513] resp)─── M33-SM (Zephyr)

The A55 caller blocks inside alp_rpc_call(ch, "fft", req, sizeof(req), resp, &resp_len, 100 /* ms */) until the M33 returns the magnitude spectrum or 100 ms elapses.

See also

Questions about this page? Discuss in Community Forum