Microelectronics, Volume. 51, Issue 6, 905(2021)

Hardware Implementation of Tanh Function Based on Second-Order Approximation and Error Compensation

ZHANG Bowen1,2, CHEN Gang1, CHEN Xu1, and LU Huaxiang1,2,3,4
Author Affiliations
  • 1[in Chinese]
  • 2[in Chinese]
  • 3[in Chinese]
  • 4[in Chinese]
  • show less

    In order to solve the problem of high resource consumption and low precision in the hardware implementation of the activation function Tanh, a Tanh function approximation algorithm combining second-order approximation and error compensation was proposed. This method first performed log2 transformation on the traditional second-order approximation function’s coefficients, which was convenient for hardware implementation and reduced the resource consumption. Then the compensation interval was divided according to the approximate function’s error curve to improve the function’s accuracy. On this basis, the circuit structure of the hardware implementation of the Tanh function was designed. The ModelSim platform was used for functional simulation, and the logic synthesis was performed under the SMIC 018 μm process. Experimental results showed that the implemented circuit’s maximum absolute error was 0007 8, which was the highest accuracy that the 8 bit output width could represent.

    Tools

    Get Citation

    Copy Citation Text

    ZHANG Bowen, CHEN Gang, CHEN Xu, LU Huaxiang. Hardware Implementation of Tanh Function Based on Second-Order Approximation and Error Compensation[J]. Microelectronics, 2021, 51(6): 905

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category:

    Received: Jan. 14, 2021

    Accepted: --

    Published Online: Feb. 14, 2022

    The Author Email:

    DOI:10.13911/j.cnki.1004-3365.210031

    Topics