A Mixed-Precision RISC-V Processor for Extreme-Edge DNN Inference

Gianmarco Ottavi, Angelo Garofalo, Giuseppe Tagliavini, Francesco Conti, Luca Benini, Davide Rossi

Abstract

Quantized Neural Networks (QNNs) are essential for deploying Deep Learning on the extreme edge, yet sub-byte precision often introduces a significant "unpacking tax" on traditional architectures. This paper presents MPIC (Mixed Precision Inference Core), a specialized RISC-V processor that natively supports mixed-precision operations (2, 4, and 8-bit) through a status-based SIMD approach. By offloading data slicing and routing to hardware, MPIC achieves up to 11.7x better performance and 155x higher energy efficiency than industry-standard ARM Cortex-M microcontrollers while maintaining a negligible area overhead.

Introduction

To run Deep Neural Networks (DNNs) on battery-powered microcontrollers, quantization is used to reduce weights and activations to low-bitwidth integers (e.g., 2-bit or 4-bit). While this reduces memory footprint, standard processors designed for 8-bit or 32-bit data must spend numerous cycles "unpacking" these values into larger containers before computation. This software overhead, or "unpacking tax," often negates the theoretical benefits of low-precision math.

The Unpacking Tax and XMPI

Traditional SIMD extensions require unique opcodes for every precision combination, leading to instruction set bloat. MPIC addresses this with the XMPI extension, which introduces "virtual" SIMD instructions that decouple the operation from the data format.

Comparison of software-based unpacking (b) versus the streamlined XMPI instruction set (c).

As shown in the code comparison above, manual unpacking (b) requires multiple extraction and packing steps to prepare sub-byte data for standard ALU units. In contrast, the XMPI approach (c) uses a single dot-product instruction, where the hardware handles the bit-level manipulation internally.

Hardware Innovation: Status-Based SIMD

The core innovation of MPIC is its status-based SIMD architecture. Instead of encoding precision into the instruction itself, the processor utilizes a Control Status Register (CSR) to define the current SIMD format.

Architecture of the MPIC core showing the status-based SIMD instruction decoding mechanism and precision encoding table.

When a virtual SIMD instruction like SDOTP.v is decoded, the hardware checks the CSR for the active format (e.g., MIX8x4). A specialized Hardware Slicer and Router then automatically partitions 32-bit registers into the required sub-byte chunks, sign-extends them, and routes them to the multipliers in a single clock cycle. This mechanism allows the processor to support a wide array of mixed-precision formats without exhausting the limited RISC-V opcode space.

Evaluation and Results

The MPIC core was evaluated against the baseline RI5CY core and ARM Cortex-M4/M7 microcontrollers using a convolutional neural network benchmark across various quantization levels.

  • Performance: MPIC is 1.1x to 4.9x faster than software-based mixed-precision on the baseline RISC-V core and up to 11.7x faster than the ARM Cortex-M7.
  • Energy Efficiency: The architecture delivers astronomical gains, proving 41x to 155x more efficient than ARM counterparts. Peak throughput for 2-bit convolutions reached 303 GMAC/s/W.
  • Area Overhead: Despite these capabilities, the specialized logic only increased the total SoC area by 0.2%, making it highly suitable for resource-constrained edge devices.

Conclusion

MPIC demonstrates that architectural support for sub-byte mixed precision can drastically improve the efficiency of edge AI. By moving the burden of data unpacking from software to a status-based hardware unit, the "unpacking tax" is effectively eliminated. Future work will focus on deeper compiler integration and exploring multi-core configurations to further scale these efficiency gains.

Summary updated

BibTeX
@inproceedings{ottavi2020mixed,
  author = {Gianmarco Ottavi and Angelo Garofalo and Giuseppe Tagliavini and Francesco Conti and Luca Benini and Davide Rossi},
  title = {{A Mixed-Precision RISC-V Processor for Extreme-Edge DNN Inference}},
  booktitle = {ISVLSI},
  year = {2020},
  url = {https://openreview.net/forum?id=wXGCkwH-XA},
}
Figure