ARM-software/CMSIS-DSP logo

ARM-software/CMSIS-DSP

Free

CMSIS-DSP embedded compute library for Cortex-M and Cortex-A

FreeFree tier
Type
Open Source
Company
ARM

About ARM-software/CMSIS-DSP

CMSIS-DSP is an optimized compute library for embedded systems, primarily targeting ARM Cortex-M and Cortex-A processors. Originally named for DSP, it now provides a broad set of compute kernels including basic mathematics (real, complex, quaternion, linear algebra, fast math), DSP (filtering), transforms (FFT, MFCC, DCT), statistics, and classical machine learning (Support Vector Machine, distance functions for clustering). Kernels are available in multiple datatypes: f64, f32, f16, q31, q15, q7. The library leverages vectorized execution via Helium (MVE) and Neon extensions when available. A Python wrapper is also provided for prototyping algorithms in Python with an API closely matching the C API, supporting NumPy and fixed-point arithmetic, and running in Google Colab. The library is open source and free to use.

Key Features

Optimized compute kernels for Cortex-M and Cortex-A processors
Vectorized execution with Helium (MVE) and Neon extensions
Basic mathematics (real, complex, quaternion, linear algebra, fast math)
DSP filtering functions
Transforms: FFT, MFCC, DCT
Statistics and classical ML (SVM, distance functions for clustering)
Multiple datatypes: f64, f32, f16, q31, q15, q7
Python wrapper with NumPy support and fixed-point arithmetic
Compatible with Google Colab
Open source under permissive license

Pros & Cons

Pros
  • Highly optimized for ARM Cortex-M and Cortex-A cores
  • Extensive set of compute kernels covering DSP, ML, transforms
  • Python wrapper enables rapid prototyping and easy transition to C
  • Supports a wide range of data types including fixed-point
  • Free and open source with no licensing restrictions
  • Vectorized implementations improve performance on Helium/Neon
Cons
  • Limited to ARM Cortex-M and Cortex-A architectures, not portable to other MCU families
  • GCC compiler currently yields suboptimal performance on Helium; Arm Compiler recommended for best results
  • Documentation and debugging may require familiarity with ARM ecosystem
  • Python wrapper requires separate installation and may lag behind C library updates

Best For

Embedded digital signal processing on ARM microcontrollersAudio filtering and analysis on Cortex-M and Cortex-AMachine learning inference on resource-constrained devicesPrototyping DSP/ML algorithms in Python before deploying C codeStatistical analysis on sensor data in embedded systems

FAQ

What is CMSIS-DSP?
CMSIS-DSP is an optimized compute library for embedded systems, providing kernels for DSP, statistics, machine learning, and transforms, targeting ARM Cortex-M and Cortex-A processors.
How can I install the Python wrapper?
The Python wrapper can be installed via pip: pip install cmsisdsp. It is compatible with NumPy and supports fixed-point arithmetic.
What types of kernels does CMSIS-DSP include?
Kernels include basic mathematics (real, complex, quaternion, linear algebra, fast math), DSP filtering, transforms (FFT, MFCC, DCT), statistics, and classical ML (e.g., SVM, distance functions).
Which ARM cores are supported?
CMSIS-DSP supports ARM Cortex-M and Cortex-A cores. It offers vectorized implementations when Helium (Cortex-M) or Neon (Cortex-A) extension is available.
How do I get the best performance from the library?
Use -O3 -ffast-math compiler flags. For Helium-based cores, the Arm Compiler is recommended as GCC currently does not yield good performance.