Skip to main content
Log in

Design, Implementation, and Evaluation of Stochastic FIR Filters Based on FPGA

  • Published:
Circuits, Systems, and Signal Processing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

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

  1. 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)

    Article  Google Scholar 

  2. 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

  3. 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

  4. 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)

    Article  Google Scholar 

  5. 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

  6. 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

  7. B.R. Gaines, Stochastic computing systems, in Advances in information systems science. (Springer, Berlin, 1969), pp. 37–172

  8. J.E. Gentle, Random number generation and Monte Carlo methods, vol. 381 (Springer, Berlin, 2003)

    MATH  Google Scholar 

  9. P.K. Gupta, R. Kumaresan, Binary multiplication with PN sequences. IEEE Trans. Acoust. Speech Signal Process. 36(4), 603–606 (1988)

    Article  MATH  Google Scholar 

  10. 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)

    Article  Google Scholar 

  11. 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

  12. 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

  13. 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

    Article  Google Scholar 

  14. Y. Liu, K.K. Parhi, Architectures for recursive digital filters using stochastic computing. IEEE Trans. Signal Process. 64(14), 3705–3718 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  15. U. Meyer-Baese, Digital signal processing with field programmable gate arrays, vol. 65 (Springer, Berlin, 2007)

    MATH  Google Scholar 

  16. 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

  17. 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

Download references

Acknowledgements

This work was supported by Qing-Lan Project [201812] of Jinagsu Municipal Education Department, P.R.China.

Author information

Authors and Affiliations

Authors

Contributions

The authors contributed equally to this work.

Corresponding author

Correspondence to Tian Ban.

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,

$$\begin{aligned} n = \sum _{i = 0}^{B-1}{d_i[n] 2^{i-B}}, (n \in {\mathbb {N}}^+) \end{aligned}$$
(17)

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,

$$\begin{aligned} g[n] = \sum _{i = 0}^{B-1}{d_i[n] 2^{-i-1}}, (n \in {\mathbb {N}}^+) \end{aligned}$$
(18)

Finally, the generation of a VDC sequence in the hardware is achieved by reversing the order of a counter’s output.

Table 6 Example of VDC sequence and the stochastic number generation

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. 1.

    The lower bits are all zeros.

  2. 2.

    The k-th bit is one.

The first condition indicates that

$$\begin{aligned} n = R \times 2^k , R \in {\mathbb {N}} \end{aligned}$$
(19)

while the second condition requires that

$$\begin{aligned} R = 2 \times N + 1, N \in {\mathbb {N}} \end{aligned}$$
(20)

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

$$\begin{aligned} m = N \times 2^{p+1} + 2^p \end{aligned}$$
(21)

Therefore,

$$\begin{aligned} n= & {} m \times 2^{k} = N \times 2^{k+p+1} + 2^{k+p} \end{aligned}$$
(22)
$$\begin{aligned} L[n]= & {} p + k = L[m] + k \end{aligned}$$
(23)

\(\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

$$\begin{aligned} L[n] =\left\{ \begin{aligned} L[m] + 1,&{\text { if } n = m \times 2}\\ 0,&{\text { if }n = m \times 2 + 1}\\ \end{aligned} \right. \end{aligned}$$
(24)

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00034-022-02170-9

Keywords

Navigation