CMSIS-DSP  Version 1.8.0
CMSIS DSP Software Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CMSIS DSP Software Library

Introduction

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:

  • Basic math functions
  • Fast math functions
  • Complex math functions
  • Filtering functions
  • Matrix functions
  • Transform functions
  • Motor control functions
  • Statistical functions
  • Support functions
  • Interpolation functions
  • Support Vector Machine functions (SVM)
  • Bayes classifier functions
  • Distance functions

The library has generally separate functions for operating on 8-bit integers, 16-bit integers, 32-bit integer and 32-bit floating-point values.

Using the Library

The library installer contains prebuilt versions of the libraries in the Lib folder. Pre-built libraries will not be updated to contain new functions. So, SVM, Bayes, Distance functions and experimental functions are not included in those libraries. If you want to use those functions, you'll have to modify the projects, include the missing files and rebuild. You can also use the cmake to build the libraries and select what you want to be included. Here is the list of pre-built libraries :

  • arm_cortexM7lfdp_math.lib (Cortex-M7, Little endian, Double Precision Floating Point Unit)
  • arm_cortexM7bfdp_math.lib (Cortex-M7, Big endian, Double Precision Floating Point Unit)
  • arm_cortexM7lfsp_math.lib (Cortex-M7, Little endian, Single Precision Floating Point Unit)
  • arm_cortexM7bfsp_math.lib (Cortex-M7, Big endian and Single Precision Floating Point Unit on)
  • arm_cortexM7l_math.lib (Cortex-M7, Little endian)
  • arm_cortexM7b_math.lib (Cortex-M7, Big endian)
  • arm_cortexM4lf_math.lib (Cortex-M4, Little endian, Floating Point Unit)
  • arm_cortexM4bf_math.lib (Cortex-M4, Big endian, Floating Point Unit)
  • arm_cortexM4l_math.lib (Cortex-M4, Little endian)
  • arm_cortexM4b_math.lib (Cortex-M4, Big endian)
  • arm_cortexM3l_math.lib (Cortex-M3, Little endian)
  • arm_cortexM3b_math.lib (Cortex-M3, Big endian)
  • arm_cortexM0l_math.lib (Cortex-M0 / Cortex-M0+, Little endian)
  • arm_cortexM0b_math.lib (Cortex-M0 / Cortex-M0+, Big endian)
  • arm_ARMv8MBLl_math.lib (Armv8-M Baseline, Little endian)
  • arm_ARMv8MMLl_math.lib (Armv8-M Mainline, Little endian)
  • arm_ARMv8MMLlfsp_math.lib (Armv8-M Mainline, Little endian, Single Precision Floating Point Unit)
  • arm_ARMv8MMLld_math.lib (Armv8-M Mainline, Little endian, DSP instructions)
  • arm_ARMv8MMLldfsp_math.lib (Armv8-M Mainline, Little endian, DSP instructions, Single Precision Floating Point Unit)

The library functions are declared in the public file arm_math.h which is placed in the Include folder. Simply include this file and link the appropriate library in the application and begin calling the library functions. The Library supports single public header file arm_math.h for Cortex-M cores with little endian and big endian. Same header file will be used for floating point unit(FPU) variants.

Examples

The library ships with a number of examples which demonstrate how to use the library functions.

Toolchain Support

The library has been developed and tested with MDK version 5.14.0.0 The library is being tested in GCC and IAR toolchains and updates on this activity will be made available shortly.

Building the Library

The library installer contains a project file to rebuild libraries on MDK toolchain in the CMSIS\DSP\Projects\ARM folder.

  • arm_cortexM_math.uvprojx

The libraries can be built by opening the arm_cortexM_math.uvprojx project in MDK-ARM, selecting a specific target, and defining the optional preprocessor macros detailed above.

There is also a work in progress cmake build. The README file is giving more details.

Preprocessor Macros

Each library project have different preprocessor macros.

  • ARM_MATH_BIG_ENDIAN:

Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.

  • ARM_MATH_MATRIX_CHECK:

Define macro ARM_MATH_MATRIX_CHECK for checking on the input and output sizes of matrices

  • ARM_MATH_ROUNDING:

Define macro ARM_MATH_ROUNDING for rounding on support functions

  • ARM_MATH_LOOPUNROLL:

Define macro ARM_MATH_LOOPUNROLL to enable manual loop unrolling in DSP functions

  • ARM_MATH_NEON:

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.

  • ARM_MATH_NEON_EXPERIMENTAL:

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.


CMSIS-DSP in ARM::CMSIS Pack

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\DSP_Lib_TestSuite DSP_Lib test suite
CMSIS\DSP\Examples Example projects demonstrating the usage of the library functions
CMSIS\DSP\Include DSP_Lib include files
CMSIS\DSP\Lib DSP_Lib binaries
CMSIS\DSP\Projects Projects to rebuild DSP_Lib binaries
CMSIS\DSP\Source DSP_Lib source files

Revision History of CMSIS-DSP

Please refer to Revision History of CMSIS-DSP.