ASIC Implementation of Activation Function in CNN
Pogiri Revathi
Assistant Professor
GMR Institute Of Technology
Chirinelli Pujita
UG Scholar
GMR Institute Of Technology
Chippada Jhansi
UG Scholar
GMR Institute Of Technology
Chaviti Anil Kumar
UG Scholar
GMR Institute Of Technology
Chintala Jayanth
UG Scholar
GMR Institute Of Technology
Chintala Ravi Kumar
UG Scholar
GMR Institute Of Technology
Abstract: The hyperbolic tangent (tanh) function is widely used in digital signal processing, machine learning, and neural network applications. Implementing tanh in hardware requires an efficient and accurate approximation technique to minimize resource usage while maintaining computational precision. This work presents a hardware-friendly approach to computing the tanh function using secant approximation, which approximates tanh(x) over defined intervals using linear segments. The proposed design leverages lookup tables (LUTs), multiplexers, shift registers, subtractor, multipliers, dividers, and adders to achieve efficient computation. The approximation method balances accuracy and hardware efficiency by optimizing the number of segments and bit-width precision. The design is implemented in Verilog and targeted for ASIC/FPGA platforms. A comprehensive testbench verifies the accuracy and performance of the implementation over the input range x ∈ [0,10]. The results demonstrate a trade-off between hardware complexity and computational accuracy, making the secant-based tanh approximation a viable solution for real-time embedded applications. For this secant approximated the accuracy for this is given as 93.2%,sensitivity is 76.76%,specificity is varies between 0.71 to 0.And the total power for the approximated tanh function is given by 92.87 % and the total required is 7122.
Keywords: Convolution Neural Network, Tanh activation function, Secant approximation,
Accuracy, Specificity, Sensitivity.