The Arm Cortex-M family of processors offers advanced processing with low power consumption for embedded systems. The M-Profile Vector Extension (MVE, also called Helium) introduced for the Armv8.1-M architecture provides significant improvements to operations such as matrix multiplications or quaternion multiplication, which are the backbone of all Machine Learning (ML) algorithms. For these reasons, Helium-enabled platforms are ideal for Digital Signal Processing (DSP) and ML applications that require high performance while maintaining low power usage. The popular Cortex-M55 was the first core to support the Helium extensions, followed by Cortex-M85 and Cortex-M52.

In a recent project, in collaboration with Analog Devices, Inc. (ADI), Antmicro improved ARMv8.1-M support in the open source Renode simulation framework, which now on top of the base Cortex-M52/55/85 core support includes Helium and FPv5 (Floating Point Unit) extensions, as well as initial support for the LOB (Low Overhead Branch) extension. This article briefly describes the scope of the improved support for ARMv8.1-M platforms, and shows how Renode can be used for comprehensive simulation and testing of Helium-based applications.

Support for Armv8.1-M with Helium in Renode

M-Profile Vector Extension for Armv8.1-M platforms

Helium is an optional extension in the Armv8.1-M architecture, providing an upgrade over the previous SIMD (Single Instruction Multiple Data) extension called Neon. While Neon has 64-bit D SIMD registers, Helium offers 128-bit Q registers, making it more optimized for simpler CPUs with fewer gates. The MVE enables cost-effective edge devices to handle advanced machine learning and digital signal processing without a need for a separate Neural Processing Unit (NPU).

To demonstrate the benefits brought by MVE, Renode was used to measure the time required to run different examples included in Arm’s CMSIS-DSP library on a Cortex-M85 with and without MVE instructions, as summarized in the graph below:

Relative execution time

In the majority of cases, using MVE provides a significant improvement in terms of execution time.

Helium support in Renode

The Renode simulation framework comes with broad support for vector instructions, including the RISC-V V extension that is typically used in ML scenarios. The recently added Helium support covers all MVE instructions, allowing to extend Renode’s use cases even further with DSP and ML applications. Additionally, Antmicro introduced a cortex-m55 cpuType, which enables using the cortex-m55 CPU explicitly in .repl files. To verify the MVE support, unit and platform tests were created.

Beyond the Helium extensions, support for FPv5 instructions was introduced. While the current implementation doesn’t support half-precision floating-point (16-bit floats) instructions for the AARCH32 (ARM) architecture, it covers VCVTA, VCVTN, VCVTP, VCVTM, VMAXNM, VMINNM, and more. The implementation is verified with dedicated Robot tests. You will also find rudimentary support for LOB (Low Overhead Branch) extension.

The extended Armv8.1-M support enables a broader class of applications to be simulated in Renode without any changes to the code. This not only simplifies and increases the accuracy of the development process, but also can be a driver for optimizing software performance in a flow similar to the one we enabled for the Trace Based Model project.

Comprehensive testing of Armv8.1-M platforms with Renode

As the collaboration between Antmicro and ADI continues, efforts are underway for Renode to become an integral part of ADI’s development environment, enabling customers to take full advantage of the advanced simulation features offered by Renode.

Renode offers broad support for Arm platforms, including multi-ISA, multi-core systems, providing a comprehensive, fully deterministic testing environment. With a portfolio of open source tools that on top of Renode includes frameworks such as Kenning and RDFM, Antmicro can help you at every stage of your project employing embedded devices, from testing, through ML model optimization and deployment, to OTA updates.

Interested to accelerate the development of your next ML-capable device? Reach out to Antmicro at contact@antmicro.com to discuss how adopting a simulation-driven approach with Renode can help achieve faster time-to-market, and visit their offering page.