CMSIS 5.8.0 Optimizes the Neural Networks and Signal Processing for Machine Learning Applications

By Saumitra Jagdale

Freelance Technology Writer

August 17, 2021


CMSIS 5.8.0 Optimizes the Neural Networks and Signal Processing for Machine Learning Applications

Interfacing compatibility determines the scope of applications for hardware devices and peripherals. CMSIS is one such interfacing standard that allows the integration of software entities from multiple vendors. The recent release of Keil’s MDK-ARM 5.35 highlights the specific update of CMSIS from 5.7.0 to 5.8.0 which is the major component of the development kit.

CMSIS enhances embedded projects from the software perspective through the integration of various packages and modules. It comes with a range of tools, APIs, and frameworks that help embedded developers achieve a smooth application build. Additionally, real-time operating systems and middleware components offer a variety of options from the development point of view.

Credits: ARM 

The organized structure of CMSIS-Pack makes it suitable for dividing and conquering the complex requirements of the applications. With the release of 5.8.0 version, CMSIS-NN and CMSIS-DSP have been separated from the composite CMSIS Core, which were one of the major components of the CMSIS packages. This discretion allows focused development of machine learning and signal processing functionalities and the respective release cycles of the packages become independent from the main CMSIS Core releases. 

There are a few minor changes in the CMSIS-DSP package, some of the GCC issues were fixed with discrete update of the DSP package to 1.9.0 version. The updated package comes with an enhanced support for f16 datatype for efficient signal processing from the recepted data. Additionally, some of the pre-built libraries were also removed from the repository for a cleaner package source.

TensorFlow Lite framework adds on the interfacing machine learning essence to the hardware applications. The updated CMSIS-NN package has gone through some significant changes in the interface of the functions supported by the TensorFlow Lite framework for Microcontrollers. Additionally, processing through M-Profile Vector Extension is comparatively better for this version, this is due to the implementation of max pool operator. The operators work on the non-overlapping regions for decreasing the size of a vector or a matrix. This results in optmized processing for machine learning use cases. 

Credits: ARM

According to Reinhard Keil, Senior Director of Embedded Tools at ARM, “the latest CMSIS version 5.8.0 has additional performance improvements for the Helium vector extension support that is implemented in the Cortex-M55 processor. This includes optimizations in the CMSIS-DSP algorithm collection and the CMSIS-collection of efficient neural network kernels for machine learning applications.”

Startup Code for CMSIS Core

The C Startup code was first introduced with CMSIS 5.6.0, which increased the code portability and the ease of development for complex builds. The device startup code in the CMSIS Core can now be written directly in C which makes it compiler toolchain independent. Additionally, the release of CMSIS 5.8.0 has made the C Startup the default startup for the devices. 

Discussing further, there are few updates in GCC Linker Description and GCC Assembler startup. Until now the assembly code utilizing byte count for the copy/zero tables for the initialization of BSS (Block Started by Symbol) and zero sections. On the other hand C startup code uses the word count instead of byte count. In CMSIS 5.8.0 both startup code variants use the same copy/zero table layout. Hence, it provides the flexibility to switch back and forth from Assembly to C startup code.

The Armv8-M Assembler startup is updated to use GAS syntax for CMSIS 5.8.0 version. The latest ARM compiler 6 comes with the support of traditional Arm Assembler(armasm) so that the software is backward compatible with all devices. Arm Compiler 6 has its foundation on LLVM/Clang, thus the assembly code for newer processors needs to be in GAS syntax.

CMSIS is an Open Source Project 

CMSIS is an open source project available on GitHub. Few issues have arised due to the side affects of previous version’s implementation failing the interface at some minor points. Most of these issues would any how be fixed in the next version, but they could be fixed by making some changes in the local tech stack. You can checkout these issues and fixes by visiting GitHub for CMSIS 5.8.0 releases. 

The repository is open source, thus it helps to address the issues reported by users and partners in terms of potential security vulnerabilities. It allows every user to access the detailed revision history, commit details, and known issues that may affect some users who relied on the side effects of previous implementations.

The other constituents of CMSIS that belong to the software packing and build process are moving to the Open-CMSIS-Pack project that can increase more possibilities in terms of development and applications. Thus it is an open governance project driven by Arm and industry partners such as NXP, STMicroelectronics, and Linaro.

Saumitra Jagdale is a Backend Developer, Freelance Technical Author, Global AI Ambassador (SwissCognitive), Open-source Contributor in Python projects, Leader of Tensorflow Community India, and Passionate AI/ML Enthusiast.

More from Saumitra