arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.05286cs.ARcs.DC
收藏

面向余数数制的 RISC-V 字长模运算指令

RISC-V Word-Size Modular Instructions for Residue Number Systems

Laurent-Stéphane Didier, Jean-Marc Robert

AI总结:

本文研究 RISC-V 字长模运算专用指令对 RNS 软件实现的影响,通过 GEM5 仿真多种模乘算法,证明 Kawamura 基扩展方案相对伪 Mersenne 模数和 x86 架构具有显著性能提升。

摘要:

余数数制(Residue Number Systems,RNS)是支持大数计算的并行数制,用于高性能数字信号处理设备和密码学应用。然而,市场主导微处理器的指令集架构僵化,限制了此类数制在软件应用中的使用。本文介绍了字长模运算专用 RISC-V 指令对余数数制软件实现的影响。我们在若干 RNS 模乘串行算法上评估了这种影响,并观察到最快的实现采用 Kawamura 等人的基扩展。使用 GEM5 模拟器进行的架构仿真表明,对于按序处理器,借助专用字长模运算指令,采用 Kawamura 基扩展的 RNS 模乘比使用伪 Mersenne 模数快 2.76 倍;对于乱序处理器,速度提升超过 3 倍。与 x86 架构相比,RISC-V 仿真显示,使用专用指令在按序处理器中所需周期数减少 4.5 倍,在乱序处理器中减少 8 倍。

英文摘要:

Residue Number Systems (RNS) are parallel number systems that allow the computation on large numbers. They are used in high performance digital signal processing devices and cryptographic applications. However, the rigidity of instruction set architectures of the market-dominant microprocessors limits the use of such number systems in software applications. This article presents the impact of word-size modular arithmetic specific RISC-V instructions on the software implementation of Residue Number Systems. We evaluate this impact on several RNS modular multiplication sequential algorithms. We observe that the fastest implementation uses the Kawamura et. al. base extension. Simulations of architectures with GEM5 simulator show that RNS modular multiplication with Kawamura's base extension is 2.76 times faster using specific word-size modular arithmetic instructions than pseudo-Mersenne moduli for In Order processors. It is more than 3 times for Out of Order processors. Compared to x86 architectures, RISC-V simulations show that using specific instructions requires 4.5 times less cycles in In Order processors and 8 less in Out of Order ones.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑