Axon DSP intrinsics integration

This guide explains how to integrate Axon NPU DSP intrinsic functions into your application. DSP intrinsics are pre-defined functions that run signal-processing workloads directly on the Axon NPU through the Axon driver.

Integration prerequisites

Integration overview

DSP intrinsics use the same Axon driver and platform initialization flow as compiled model inference, but they do not require a compiled model, interlayer buffer sizing for a network, or the Axon TFLite compiler.

The API is documented in Axon DSP intrinsics. See Axon DSP intrinsics for the full list of functions.

Integration steps

Complete the following steps:

  1. Initializing the driver

  2. Calling intrinsic functions

  3. Integrating intrinsics into your application

Initializing the driver

Initialize the Axon driver before calling any DSP intrinsic function:

  1. Call the platform initialization function:

    nrf_axon_platform_init();
    

    On Zephyr, the Axon base address is obtained from the device tree during platform initialization.

    Note

    Do not create or manage a driver handle. Axon is implemented as a singleton, and the driver serializes access internally.

Calling intrinsic functions

Include the DSP intrinsics header and call the function that matches your workload:

#include "drivers/axon/nrf_axon_driver.h"
#include "drivers/axon/nrf_axon_dsp_intrinsics.h"

Most intrinsic functions accept input and output buffers, workload parameters, a synchronous blocking mode, and a keep_reservation flag. Set keep_reservation to true when you plan to run another Axon operation immediately afterward.

For short standalone workloads, use NRF_AXON_SYNC_MODE_BLOCKING_POLLING as the blocking mode.

Refer to Axon DSP intrinsics for function-specific parameter requirements and data type conventions.

Integrating intrinsics into your application

Wire the driver initialization and intrinsic calls into your application startup and processing flow.

Ensure you have completed the following:

  1. Enabled the CONFIG_NRF_AXON Kconfig option in your application’s prj.conf file.

  2. Called nrf_axon_platform_init() once at startup before any intrinsic function.

  3. Included nrf_axon_driver.h and nrf_axon_dsp_intrinsics.h where intrinsic functions are used.

  4. Validated the intrinsic outputs your application depends on, using known-good input vectors or reference data for your workload.

When combining intrinsics with compiled model inference in the same application, ensure that Axon hardware access remains serialized through the driver and size the interlayer buffer for your largest model as described in Axon inference integration.

Note

Test: DSP intrinsics is a fixed regression test for the SDK. It confirms that the platform and driver work, but it does not validate your application’s buffers, parameters, or data flow. If intrinsic calls fail unexpectedly in your application, re-run Test: DSP intrinsics to rule out environment or toolchain issues before debugging application logic.