Abstract
Multiply-and-Accumulate (MAC) unit is a key element in various applications of digital signal processing. Researchers have shown the MAC implemented in the domain of Stochastic Computing (SC), a computing diagram based on probability-encoded Stochastic Numbers (SN), presents appealing properties of low area, low power, and flexible precision compared to its counterpart in conventional binary-encoded approaches. However, existing designs of SC-MAC suffer from inherent random fluctuation noise of SN. To achieve satisfactory accuracy, a long SN must be generated and introduce large latency. In this paper, we propose an SC-MAC design that is optimized in signed operation and a linear phase FIR filter that benefits from SC. By exploiting the properties of Low-Discrepancy (LD) sequence, we halve the latency with less hardware consumption without losing accuracy. For filter design, we specifically choose the linear phase FIR filter that is not only a structure widely used but can match and benefit our optimized SC-MAC in terms of minimizing memory usage. Experimental results show that the proposed design outperforms state-of-the-art SC-based FIR filters in accuracy at the same sequence length. Furthermore, the proposed design achieves the least hardware consumption at the same accuracy on FPGA compared to the existing works.
Similar content being viewed by others
Data Availibility
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.
References
H. Abdellatef, M. Khalil-Hani, N. Shaikh-Husin, S.O. Ayat, Low-area and accurate inner product and digital filters based on stochastic computing. Signal Process. 183, 108040 (2021)
M. Alawad, M. Lin, Fir filter based on stochastic computing with reconfigurable digital fabric, in IEEE 23rd annual international symposium on field-programmable custom computing machines. (IEEE, 2015), pp. 92–95
A. Alaghi, C. Li, J.P. Hayes, Stochastic circuits for real-time image-processing applications, in Proceedings of the 50th annual design automation conference (2013) pp. 1–6
A. Alaghi, W. Qian, J.P. Hayes, The promise and challenge of stochastic computing. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst. 37(8), 1515–1531 (2017)
A. Alaghi, J.P. Hayes, Fast and accurate computation using stochastic circuits, in Design, automation and test in Europe conference and exhibition (DATE) (IEEE, 2014) pp. 1–4
T.-H. Chen, P. Ting, J.P. Hayes, Achieving progressive precision in stochastic computing, in 2017 IEEE global conference on signal and information processing (GlobalSIP) (IEEE, 2017) pp. 1320–1324
B.R. Gaines, Stochastic computing systems, in Advances in information systems science. (Springer, Berlin, 1969), pp. 37–172
J.E. Gentle, Random number generation and Monte Carlo methods, vol. 381 (Springer, Berlin, 2003)
P.K. Gupta, R. Kumaresan, Binary multiplication with PN sequences. IEEE Trans. Acoust. Speech Signal Process. 36(4), 603–606 (1988)
H. Ichihara, T. Sugino, S. Ishii, T. Iwagaki, T. Inoue, Compact and accurate digital filters based on stochastic computing. IEEE Trans. Emerg. Top. Comput. 7(1), 31–43 (2016)
V.T. Lee, A. Alaghi, J.P. Hayes, V. Sathe, L. Ceze, Energy-efficient hybrid stochastic-binary neural networks for near-sensor computing. in Design, automation and test in Europe conference and exhibition (DATE). (IEEE, 2017), pp. 13–18
S. Liu, J. Han, Energy efficient stochastic computing with sobol sequences, in Design, automation and test in Europe conference and exhibition (DATE) (IEEE, 2017), pp. 650–653
Y. Liu, S. Liu, Y. Wang, F. Lombardi, J. Han, A survey of stochastic computing neural networks for machine learning applications. IEEE Trans. Neural Netw. Learn. Syst. (2020). https://doi.org/10.1109/tnnls.2020.3009047
Y. Liu, K.K. Parhi, Architectures for recursive digital filters using stochastic computing. IEEE Trans. Signal Process. 64(14), 3705–3718 (2016)
U. Meyer-Baese, Digital signal processing with field programmable gate arrays, vol. 65 (Springer, Berlin, 2007)
H. Sim. J. Lee, A new stochastic computing multiplier with application to deep convolutional neural networks, in Proceedings of the 54th annual design automation conference 2017, pp. 1–6
R. Wang, J. Han, B. Cockburn, D. Elliott, Design and evaluation of stochastic fir filters, in 2015 IEEE Pacific Rim conference on communications, computers and signal processing (PACRIM). (IEEE, 2015), pp. 407–412
Acknowledgements
This work was supported by Qing-Lan Project [201812] of Jinagsu Municipal Education Department, P.R.China.
Author information
Authors and Affiliations
Contributions
The authors contributed equally to this work.
Corresponding author
Ethics declarations
Conflict of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix A Van der Corput Sequence Fundamentals
Appendix A Van der Corput Sequence Fundamentals
A van der Corput (VDC) sequence is an example of the simplest low-discrepancy (LD) sequence over the unit interval. It was first described in 1935 by the Dutch mathematician J. G. van der Corput. It is constructed by reversing the binary representation of the sequence of nonnegative integers n,
The \(d_i[n]\) is the i-th digit of the B-bit binary representation of nonnegative integers n. The corresponding B-bit binary number in VDC sequence is,
Finally, the generation of a VDC sequence in the hardware is achieved by reversing the order of a counter’s output.
In the SNG, we described in Sect. 2.1, the VDC sequence serves as one of the inputs of the WBG, which is essentially a priority encoder that selects the input binary digit. Which digit is selected is determined by the most significant one in VDC sequence g[n], in other words, the least significant one of the counter’s output n.
The least significant one of continuous nonnegative integers n follows a regular pattern that we exploited to optimize the SC-MAC. Let L[n] indicate the least significant one position of n. From Table 6, two properties of the stochastic number generated from the VDC sequence can be observed: All the odd elements of a VDC sequence are still a VDC sequence consisting of the remaining bits \((x_{B-2} x_{B-3}\ldots x_0)_{bin}\), and all the even elements of a VDC sequence are the MSB \(x_B-1\). The detailed mathematical proof is provided below.
Theorem 1
\(L[n] = k\), if \(n = N \times 2^{k+1} + 2^k, (N, k \in {\mathbb {N}})\)
Proof
If the position of the least significant one of a binary number is k (i.e., \(L(n) = k\)), then two conditions should be fulfilled:
-
1.
The lower bits are all zeros.
-
2.
The k-th bit is one.
The first condition indicates that
while the second condition requires that
Therefore, \(n = N \times 2^{k+1} + 2^k\)
\(\square \)
Corollary 1
\(L[n] = L[m] + k\), if \(n = m \times 2^{k}, (k \in {\mathbb {N}}, m \in {\mathbb {N}}^+)\)
Proof
Per Theorem 1, assuming \(L[m] = p, (p \in {\mathbb {N}}^+)\), we have
Therefore,
\(\square \)
Now we prove the two properties we described in Sec. 3.1. By substituting \(k = 1\) into Corollary 1, and \(k = 0\) into Theorem 1, we have
The two properties are explained.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Wang, Z., Ban, T. Design, Implementation, and Evaluation of Stochastic FIR Filters Based on FPGA. Circuits Syst Signal Process 42, 1142–1162 (2023). https://doi.org/10.1007/s00034-022-02170-9
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00034-022-02170-9