Abstract:
Stochastic Computing(SC) is a new technology that encodes numerical value by probability, which can effectively reduce the power consumption and area of the circuit. However, the loss of calculation accuracy caused by its inherent random characteristics limits its application. In order to improve the accuracy of Stochastic Computing, a high-precision Stochastic Computing addition unit based on error compensation principle is proposed, and a SC-MAX element is designed to calculate the maximum value of SC sequence. The simulation results show that, compared with the similar design, the calculation accuracy of the two calculation units is significantly improved. The relative error of the addition unit is reduced by more than 80% under the same SC length, and the relative error of the SC-MAX calculation unit is reduced by 90% compared with the similar design, and the LUT and FF overhead is significantly reduced by more than 10%. The two kinds of calculation units are applied to neural network. The reasoning results on MNIST and CIFAR10 data sets show that the precision loss is less than 0.04%and 0.86% respectively comparedto float point results.