A Custom RISC-V Instruction for SVPWM Acceleration on FPGA Softcore

MUHAMMAD BUDI SATRIA YONDA, RIZKI ARDIANTO PRIRAMADHI, JUNARTHO HALOMOAN

Abstract


Space Vector Pulse-Width Modulation (SVPWM) is a key computation in three-phase motor control executed every switching period. On RISC-V softcore processors, software SVPWM consumes a large fraction of available execution time, and standard extensions such as RV32IM and Zbb are insufficient to resolve this constraint. This paper proposes cf_svpwm, a custom RISC-V instruction integrating all SVPWM kernel stages — inverse Clarke transform, min/max normalization, offset computation, and duty-cycle scaling — into a single atomic hardware operation. A read-latch mode stores all three duty-cycles in hardware latches accessed via cf_read_u/v/w instructions. Evaluated on NEORV32 processor at 50 MHz (Intel Cyclone V FPGA) with 27,823 test vectors, cf_svpwm achieves 17.8× speedup over the RV32I baseline (445→25 cycles, 8.90→0.50 μs), reducing control-period utilization from 17.80% to 1.00% at 20 kHz. Maximum quantization error remains within 1 LSB at 74.72 MHz Fmax.

Keywords


Custom Instruction; RISC-V; SVPWM; FPGA; Real-Time Control

Full Text:

PDF

References


Cui, E., Li, T., & Wei, Q. (2023). RISC-V Instruction Set Architecture Extensions: A Survey. IEEE Access, 11, 24696–24711. https://doi.org/10.1109/ACCESS.2023.3246491

Di Benedetto, L., Donisi, A., Licciardo, G. D., & Rubino, A. (2022). A Hardware Architecture for SVPWM Digital Control With Variable Carrier Frequency and Amplitude. IEEE Transactions on Industrial Informatics, 18(8), 5330–5337. https://doi.org/10.1109/TII.2021.3124840

Di Benedetto, L., Donisi, A., Liguori, R., Rubino, A., & Licciardo, G. D. (2024). A New Hardware Architecture for SVPWM Technique Based on the Taylor Decomposition. IEEE Journal of Emerging and Selected Topics in Power Electronics, 12(2), 2260–2267. https://doi.org/10.1109/JESTPE.2023.3349217

Gautschi, M., Schiavone, P. D., Traber, A., Loi, I., Pullini, A., Rossi, D., Flamand, E., Gurkaynak, F. K., & Benini, L. (2017). A near-threshold RISC-V core with DSP extensions for scalable IoT Endpoint Devices. IEEE Transactions on Very Large Scale Integration (VLSI) Systems. https://doi.org/10.1109/TVLSI.2017.2654506

Li, X., Gao, H., Chen, W., Shi, T., & Xia, C. (2025). Series IGBT Chopping Strategy Based on SVPWM for PMSM Drives With Small DC-Link Capacitance. IEEE Transactions on Power Electronics, 40(1), 129–134. https://doi.org/10.1109/TPEL.2024.3470898

Lu, S., Zhenhong, Y., Yongsheng, X., Jianhao, Z., Tong, W., Yu, Z., Yuqiu, S., Junyou, Y., Zhang, L., & Wang, H. (2023). Space vector pulse width modulation strategy for modular multilevel converters in power system. IET Cyber-Physical Systems: Theory and Applications, 8(3), 186–194. https://doi.org/10.1049/cps2.12052

Mahafzah, K. A., Rabab’ah, H. A., Al-Odienat, A., Al-Momani, M., Al-Maitah, K., & Al-Mbaideen, A. (2022). The Dynamic Response of SPWM vs. SVPWM Synchronverter. WSEAS Transactions on Power Systems, 17, 93–102. https://doi.org/10.37394/232016.2022.17.11

Mohan, P., Das, S., & Mai, K. (2025). A RISC-V SoC With Reconfigurable Custom instructions on a Synthesized eFPGA Fabric in 22nm FinFET. IEEE Solid-State Circuits Letters, 8, 321–324. https://doi.org/10.1109/LSSC.2025.3618942

Ostadrahimi, A., & Bifaretti, S. (2023). A Simplified Multilevel Space Vector Pulsewidth Modulation (SVPWM) Based on Boundary Lines, Including Overmodulation Zone. IEEE Open Journal of Industry Applications, 4, 215–226. https://doi.org/10.1109/OJIA.2023.3289094

Peng, C. W., Jambek, A. B., Dass, S. B., Wah, L. T., Laudis, L. L., Yadlapati, A., Udari, G. C., & Rama Sanjeeva Reddy, B. (2024). Performance Evaluation of RISC-V Microcontroller System on FPGA: A Study of the NEORV32 Core. International Journal of Integrated Engineering, 16(1), 312–317. https://doi.org/10.30880/IJIE.2024.16.01.026

Popovici, C. A., Stan, A., & Manta, V. I. (2023). RISC-V Extension for Optimized PWM Control. 2023 27th International Conference on System Theory, Control and Computing, ICSTCC 2023 - Proceedings, 404–409. https://doi.org/10.1109/ICSTCC59206.2023.10308510

Sun, T., Zhu, S., Long, L., Liu, C., Xia, L., & Zhang, X. (2024). Analysis of Third-Harmonic Modulation Capability of Five-Phase Motor Drive and Near-Six-Vector SVPWM Algorithm. IEEE Transactions on Industrial Electronics, 71(7), 6481–6489. https://doi.org/10.1109/TIE.2023.3310028

Tam, H. P. T., & Hung, T. T. (2023). Space Vector Modulation for Induction Motor on ARM-based Microcontroller. CTU Journal of Innovation and Sustainable Development, 15(1), 29–40. https://doi.org/10.22144/ctu.jen.2023.004

Tawfiq, K. B., Zeineldin, H., Al-Durra, A., & El-Saadany, E. F. (2024). Enhanced SVPWM Techniques for Six-Phase Inverters: Mitigation of Current Harmonics and Common Mode Voltage. IEEE Open Journal of the Industrial Electronics Society, 5, 1339–1352. https://doi.org/10.1109/OJIES.2024.3512588

Waterman, A., Asanovic, K. A., & Hauser, J. (2021). The RISC-V Instruction Set Manual. RISC-V Foundation. https://riscv.org/technical/specifications/

Xia, X., & Chen, Y. (2026). Design and Implementation of Risc-V AC Servo Driver with Analog Signal. Dalam X. Yang, X. Cheng, F. Yang, W. Xie, Y. Liu, & Y. Liu (Ed.), The Proceedings of 2025 International Conference of Electrical, Electronic and Networked Energy Systems EENES 2025. Lecture Notes in Electrical Engineering, vol 1629. Springer, Singapore. https://doi.org/10.1007/978-981-92-0627-8_42

Xin, J., Cha, M., Shi, L., Jiang, X., Long, C., Lin, Q., Li, H., Wang, F., & Wang, P. (2023). Design and Implementation of an Efficient Hardware Coprocessor IP Core for Multi-axis Servo Control Based on Universal SoC. Electronics (Switzerland), 12(2). https://doi.org/10.3390/electronics12020452

Yin, Q., Li, D., Wu, Z., Pun, S. H., & Liu, Y. (2024). Design and implementation of RISC-V system-on-chip for SPWM generation based on FPGA. IEICE Electronics Express, 21(24), 1–6. https://doi.org/10.1587/elex.21.20240603

Zaruba, F., & Benini, L. (2019). The cost of application-class processing: Energy and performance analysis of a Linux-ready 1.7-GHz 64-bit RISC-V core in 22-nm FDSOI technology. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 27(11), 2629–2640. https://doi.org/10.1109/TVLSI.2019.2926114

Zhou, J., Yang, J., Gao, S., Song, D., Dong, M., & Huang, L. (2024). Novel SVPWM Update Strategy to Solve Calculation Delay in PMSM Driver. IEEE Transactions on Power Electronics, 39(12), 15462–15467. https://doi.org/10.1109/TPEL.2024.3452704




DOI: https://doi.org/10.26760/elkomika.v14i4.553

Refbacks

  • There are currently no refbacks.


 

_______________________________________________________________________________________________________________________

ISSN (print) : 2338-8323 | ISSN (electronic) : 2459-9638

Publisher:

Department of Electrical Engineering Institut Teknologi Nasional Bandung, Indonesia

Address: 20th Building  Institut Teknologi Nasional Bandung PHH. Mustofa Street No. 23 Bandung 40124, Indonesia

Contact: +627272215 (ext. 206)

Email: jte.itenas@itenas.ac.id________________________________________________________________________________________________________________________

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Creative Commons License