吴绮, 金楚丰, 陈刚, 鲁华祥, 陈旭. 基于DCORDIC算法的Tanh函数硬件设计与实现[J]. 微电子学与计算机, 2020, 37(12): 22-26, 32.
引用本文: 吴绮, 金楚丰, 陈刚, 鲁华祥, 陈旭. 基于DCORDIC算法的Tanh函数硬件设计与实现[J]. 微电子学与计算机, 2020, 37(12): 22-26, 32.
WU Qi, JIN Chu-feng, CHEN Gang, Lu Hua-xiang, CHEN Xu. Hardware design and implementation of Tanh based on DCORDIC algorithm[J]. Microelectronics & Computer, 2020, 37(12): 22-26, 32.
Citation: WU Qi, JIN Chu-feng, CHEN Gang, Lu Hua-xiang, CHEN Xu. Hardware design and implementation of Tanh based on DCORDIC algorithm[J]. Microelectronics & Computer, 2020, 37(12): 22-26, 32.

基于DCORDIC算法的Tanh函数硬件设计与实现

Hardware design and implementation of Tanh based on DCORDIC algorithm

  • 摘要: 双曲正切函数(Tanh)在神经网络中经常被用作激活函数,而其非线性的特点导致难以用硬件电路直接计算实现.为了快速有效的实现Tanh函数,提出采用DCORDIC(Differential Coordinate Rotation Digital Computer)算法在不同模式下实现双曲正弦、双曲余弦函数和除法运算,并在设计中增加选择模块扩大输入数据的范围,最终设计实现的Tanh计算核具有超长流水线,当迭代次数为13时,计算误差在2-8以内.与现有的硬件实现方式相比,本文的实现方式具有更小的误差、更高的运算速度和更大的吞吐率

     

    Abstract: Hyperbolic tangent function (Tanh) is often used as an activation function in neural networks, but its non-linear character makes it difficult to be realized by hardware circuit directly. In order to implement the Tanh function quickly and efficiently, the DCORDIC(Differential Coordinate Rotation Digital Computer) algorithm is proposed to implement the hyperbolic sine/cosine function and division operation in different modes, and a selection module is added to expand the range of input data. The final design implementation of the tanh computation core has a very long pipeline with a computational error of 2-8. Compared with the existing hardware implementation methods, the proposed implementation method has smaller error, higher computing speed and greater throughput.

     

/

返回文章
返回