CMSIS-DSP
Version 1.9.0
CMSIS DSP Software Library
|
This user manual describes the CMSIS DSP software library, a suite of common signal processing functions for use on Cortex-M and Cortex-A processor based devices.
The library is divided into a number of functions each covering a specific category:
The library has generally separate functions for operating on 8-bit integers, 16-bit integers, 32-bit integer and 32-bit floating-point values.
The library is providing vectorized versions of most algorthms for Helium and of most f32 algorithms for Neon.
When using a vectorized version, provide a little bit of padding after the end of a buffer (3 words) because the vectorized code may read a little bit after the end of a buffer. You don't have to modify your buffers but just ensure that the end of buffer + padding is not outside of a memory region.
The library is released in source form. It is strongly advised to compile the library using -Ofast to have the best performances.
The library functions are declared in the public file arm_math.h
which is placed in the Include
folder. Simply include this file. If you don't want to include everything, you can also rely on headers in Include/dsp folder and use only what you need.
The library ships with a number of examples which demonstrate how to use the library functions.
The library is now tested on Fast Models building with cmake. Core M0, M4, M7, M33, M55, A32 are tested.
Each library project have different preprocessor macros.
Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.
Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices
Define macro ARM_MATH_ROUNDING for rounding on support functions
Define macro ARM_MATH_LOOPUNROLL to enable manual loop unrolling in DSP functions
Define macro ARM_MATH_NEON to enable Neon versions of the DSP functions. It is not enabled by default when Neon is available because performances are dependent on the compiler and target architecture.
Define macro ARM_MATH_NEON_EXPERIMENTAL to enable experimental Neon versions of of some DSP functions. Experimental Neon versions currently do not have better performances than the scalar versions.
It implies the flags ARM_MATH_MVEF and ARM_MATH_MVEI and ARM_MATH_MVE_FLOAT16.
Only taken into account when ARM_MATH_MVEF, ARM_MATH_MVEI or ARM_MATH_MVE_FLOAT16 are defined. Enable some vector versions which may have worse performance than scalar depending on the core / compiler configuration.
Select Helium versions of the f32 algorithms. It implies ARM_MATH_FLOAT16 and ARM_MATH_MVEI.
Select Helium versions of the int and fixed point algorithms.
MVE Float16 implementations of some algorithms (Requires MVE extension).
Disable float16 algorithms when __fp16 is not supported for a specific compiler / core configuration. This is only valid for scalar. When vector architecture is supporting f16 then it can't be disabled.
With Helium or Neon, disable the use of vectorized code with C intrinsics and use pure C instead. The vectorization is then done by the compiler.
The following files relevant to CMSIS-DSP are present in the ARM::CMSIS Pack directories:
File/Folder | Content |
---|---|
CMSIS\Documentation\DSP | This documentation |
CMSIS\DSP\Examples | Example projects demonstrating the usage of the library functions |
CMSIS\DSP\Include | DSP_Lib include files for using and building the lib |
CMSIS\DSP\PrivateInclude | DSP_Lib private include files for building the lib |
CMSIS\DSP\Lib | DSP_Lib binaries |
CMSIS\DSP\Source | DSP_Lib source files |
Please refer to Revision History of CMSIS-DSP.