• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2022, Vol. 44 ›› Issue (10): 1747-1752.

• 高性能计算 • 上一篇    下一篇

基于FPGA快速实现定制化RISC-V处理器

陆松1,蒋句平2,任会峰1   

  1. (1.无锡学院,江苏 无锡 214105;2.国防科技大学计算机学院,湖南 长沙 410073)
  • 收稿日期:2021-06-01 修回日期:2021-10-18 接受日期:2022-10-25 出版日期:2022-10-25 发布日期:2022-10-28
  • 基金资助:
    无锡学院人才启动经费(550220022)

Quick customization for RISC-V processor based on FPGA

LU Song1,JIANG Ju-ping2,REN Hui-feng1   

  1. (1.Wuxi University,Wuxi 214105;2.College of Computer Science and Technology,National University of Defense Technology,Changsha 410073,China)
  • Received:2021-06-01 Revised:2021-10-18 Accepted:2022-10-25 Online:2022-10-25 Published:2022-10-28

摘要: 随着RISC-V指令集的流行,出现了一批应用于IoT智能硬件、嵌入式系统、人工智能芯片、安全设备及高性能计算等不同领域的开源和商业IP软核。性能、功耗和面积三者之间的平衡需要指令集可裁剪、易扩展,以及软件开发环境的配套支持。为此,按照增加自定义指令、扩展ALU功能单元、连接控制信号和数据通路、FPGA原型验证、定制交叉编译环境和应用程序测试的流程,基于FPGA快速实现了定制化RISC-V处理器。以加速矩阵运算为例,基于FPGA在开源IP蜂鸟E203上设计了一条计算向量内积的自定义指令,并在FPGA上进行了原型验证。应用测试程序表明,定制化的RISC-V处理器的计算性能有显著提升,矩阵乘法运算的性能加速比达到了5.3~7.6。

关键词: RISC-V, 指令集, 定制化, 处理器, FPGA

Abstract: With the rising of the open instruction set RISC-V, a number of open source and commercial soft cores have emerged, which are used in different fields such as IoT hardware, embedded systems, artificial intelligence chips, security devices, and high-performance computers. How to better balance between performance, power consumption, and chip area requires that the instruction set can be easily tailored, extended, and supported by the software development environment. To this end, this paper proposes a quick customization method for RISC-V processor, through adding custom instructions, extending ALU functional units, connecting control signals and data paths, FPGA prototype verification, customizing the cross compiler and application testing. Taking the matrix calculation acceleration as an example, a customized instruction for the vector inner production is designed on the open source IP Hummingbird E203, finishes the prototype verification on FPGA. The matrix calculation benchmark shows that the performance of the customized RISC-V processor has been significantly improved. For matrix multiplication, the performance speedup reaches 5.3~7.6.

Key words: RISC-V, instruction set, customization, processor, FPGA