arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.23547cs.ARcs.AI
收藏

面向FPGA的高效硬件实现Sigmoid函数的混合基数双曲旋转CORDIC架构

Hardware-Efficient FPGA Implementation of Sigmoid Function Using Mixed-Radix Hyperbolic Rotation CORDIC

Pandit Deendayal Energy University, Gujarat, India(潘迪·德恩迪亚尔能源大学,古吉拉特邦,印度)

Chintan Panchal, Ankur Changela, Mohendra Roy

AI总结:

本文提出了一种基于混合基数双曲旋转CORDIC架构的FPGA实现Sigmoid函数方法,通过将输入范围归一化并利用双曲正切函数的数学关系,提高收敛性并减少硬件开销。

摘要:

非线性激活函数的高效硬件实现是将人工神经网络部署到资源受限和边缘设备如现场可编程门阵列(FPGAs)中的关键任务。Sigmoid激活函数广泛用于概率输出、二分类和循环神经网络中的门控机制,尽管其依赖于指数计算。本文提出了一种基于混合基数CORDIC架构的FPGA实现Sigmoid激活函数的方法。该方法利用Sigmoid和双曲正切函数之间的数学关系。将输入范围归一化为1,使相应的双曲正切计算在0.5的缩小范围内运行,显著提高了收敛行为。为实现高精度并减少硬件开销,提出了一种结合基数2和基数4迭代的改进混合基数双曲旋转CORDIC(MR-HRC)算法。初始基数2阶段确保收敛稳定性,后续基数4阶段加速收敛而不需缩放因子补偿。最终阶段使用基数2线性向量CORDIC(R2-LVC)计算双曲正切,通过从MR-HRC算法中得到的双曲正弦和余弦值进行除法。整个架构完全流水线化,并在FPGA上实现。设计在Xilinx Virtex-7 FPGA上使用16位定点表示实现。实验结果表明,硬件利用率显著降低,仅需835个逻辑单元,无DSP使用。此外,该设计实现了均方误差为4.23×10^-4,优于几种最近的Sigmoid实现。

英文摘要:

Efficient hardware implementation of nonlinear activation functions is a crucial task in deploying artificial neural networks on resource-constrained and edge devices such as Field-Programmable Gate Arrays (FPGAs). The sigmoid activation function is widely used for probabilistic output, binary classification, and gating mechanisms in recurrent neural networks, despite its reliance on exponential computations. This paper presents a hardware-efficient FPGA implementation of the sigmoid activation function using a mixed-radix CORDIC-based architecture. The proposed approach leverages the mathematical relationship between the sigmoid and hyperbolic tangent functions. The input range is normalized to 1, enabling the corresponding tanh computation to operate within a reduced range of 0.5, which significantly improves convergence behavior. To achieve high accuracy with minimal hardware overhead, a modified mixed-radix hyperbolic rotation CORDIC (MR-HRC) algorithm combining radix-2 and radix-4 iterations is introduced. The initial radix-2 stage ensures stable convergence, while the subsequent radix-4 stage accelerates convergence without requiring scale-factor compensation. In the final stage, a radix-2 linear vectoring CORDIC (R2-LVC) is used to compute the hyperbolic tangent by dividing hyperbolic sine and cosine values derived from the MR-HRC algorithm. The entire architecture is fully pipelined and implemented on an FPGA. The design is realized on an Xilinx Virtex-7 FPGA using a 16-bit fixed-point representation. Experimental results demonstrate a significant reduction in hardware utilization, requiring only 835 logic slices with zero DSP usage. Additionally, the design achieves a mean absolute error of 4.23 10^-4, outperforming several recent sigmoid implementations.

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

↑