[Paper Review] RVCoreP-32IM: An effective architecture to implement mul/div instructions for five stage RISC-V soft processors
This paper proposes RVCoreP-32IM, a 5-stage in-order RISC-V soft processor extension that efficiently integrates hardware multiplication and division (M-extension) using a simple fork-join microarchitectural structure. The design achieves 1.87× and 3.13× performance gains over RV32I in radix-4 and DSP-based multiplier benchmarks, respectively, with 13% better performance than VexRiscv and only 1.5× area overhead.
RISC-V, an open instruction set architecture, is getting the attention of soft processor developers. Implementing only a basic 32-bit integer instruction set of RISC-V, which is defined as RV32I, might be satisfactory for embedded systems. However, multiplication and division instructions are not present in RV32I, rather than defined as M-extension. Several research projects have proposed both RV32I and RV32IM processor. However, there is no indication of how much performance can be improved by adding M-extension to RV32I. In other words, when we should consider adding M-extension into the soft processor and how much hardware resource requirements will increase. In this paper, we propose an extension of the RVCoreP soft processor (which implements RV32I instruction set only) to support RISC-V M-extension instructions. A simple fork-join method is used to expand the execution capability to support M-extension instructions as well as a possible future enhancement. We then perform the benchmark using Dhrystone, Coremark, and Embench programs. We found that RV32IM is 1.87 and 3.13 times better in performance for radix-4 and DSP multiplier, respectively. In addition to that, our RV32IM implementation is 13\% better than the equivalent RISC-V processor.
Motivation & Objective
- To evaluate the performance and resource cost of adding RISC-V M-extension (mul/div) to a 5-stage in-order soft processor.
- To design an efficient, low-overhead microarchitectural extension for M-extension instructions using a fork-join structure in the execute stage.
- To compare the performance of RVCoreP-32IM with and without hardware multipliers (radix-4 vs. DSP-based) across standard benchmarks.
- To assess the impact of compiler optimization and instruction mix on performance gains from M-extension support.
- To provide a reusable, configurable framework for extending soft processors with RISC-V extensions, including future custom instructions.
Proposed method
- Extends the existing RVCoreP-32I soft processor (RV32I only) with a multi-cycle execution unit for M-extension instructions using a fork-join structure in the execute stage.
- Implements two multiplier variants: a sequential radix-4 Booth multiplier and a DSP block-based multiplier for higher performance.
- Uses a digit-recurrent division algorithm for hardware division, prioritizing simplicity and LUT efficiency.
- Configures the processor in Verilog HDL to support both RV32I and RV32IM instruction sets, enabling runtime selection of instruction set.
- Employs standard benchmarks (Dhrystone, Coremark, Embench) to measure performance and resource usage on Artix-7 FPGA.
- Compares execution time and DMIPS/MHz/Coremark/MHz metrics against VexRiscv and other implementations to quantify performance gains.
Experimental results
Research questions
- RQ1How much performance improvement does adding M-extension (mul/div) provide over RV32I in a 5-stage in-order RISC-V soft processor?
- RQ2What is the hardware area overhead of integrating M-extension instructions into a soft processor?
- RQ3How do different multiplier implementations (radix-4 vs. DSP-based) affect performance and resource usage?
- RQ4To what extent do compiler optimizations and instruction mix influence performance gains from hardware multiplication and division?
- RQ5Can a simple fork-join microarchitectural extension effectively support M-extension with minimal area and timing overhead?
Key findings
- RVCoreP-32IM achieves an average performance gain of 1.87× over RV32I when using a radix-4 Booth multiplier for multiplication.
- With a DSP-based multiplier, performance improves by 3.13× over RV32I, indicating significant benefit from high-throughput hardware multipliers.
- The RVCoreP-32IM implementation outperforms VexRiscv by 13% in total execution time across all benchmark programs.
- DMIPS/MHz increases from 1.03 (RV32I) to 1.40 (RV32IM with DSP multiplier), and Coremark/MHz rises from 0.84 to 2.33.
- The FPGA resource utilization for RV32IM is approximately 1.5× that of RV32I, indicating moderate area cost for substantial performance gains.
- Performance gains are most significant in compute-intensive workloads like cubic and matmult-int, where M-extension instruction ratios are high.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.