group___f_i_r___sparse.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>CMSIS-DSP: Finite Impulse Response (FIR) Sparse Filters</title>
  7. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  8. <link href="cmsis.css" rel="stylesheet" type="text/css" />
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="resize.js"></script>
  13. <script type="text/javascript" src="navtree.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(initResizable);
  16. </script>
  17. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <script type="text/javascript">
  20. $(document).ready(function() { searchBox.OnSelectItem(0); });
  21. </script>
  22. <link href="stylsheetf" rel="stylesheet" type="text/css" />
  23. </head>
  24. <body>
  25. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  26. <div id="titlearea">
  27. <table cellspacing="0" cellpadding="0">
  28. <tbody>
  29. <tr style="height: 46px;">
  30. <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  31. <td style="padding-left: 0.5em;">
  32. <div id="projectname">CMSIS-DSP
  33. &#160;<span id="projectnumber">Version 1.4.4</span>
  34. </div>
  35. <div id="projectbrief">CMSIS DSP Software Library</div>
  36. </td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. <!-- end header part -->
  42. <div id="CMSISnav" class="tabs1">
  43. <ul class="tablist">
  44. <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li>
  45. <li><a href="../../Core/html/index.html"><span>CORE</span></a></li>
  46. <li><a href="../../Driver/html/index.html"><span>Driver</span></a></li>
  47. <li class="current"><a href="../../DSP/html/index.html"><span>DSP</span></a></li>
  48. <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li>
  49. <li><a href="../../Pack/html/index.html"><span>Pack</span></a></li>
  50. <li><a href="../../SVD/html/index.html"><span>SVD</span></a></li>
  51. </ul>
  52. </div>
  53. <!-- Generated by Doxygen 1.8.2 -->
  54. <script type="text/javascript">
  55. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  56. </script>
  57. <div id="navrow1" class="tabs">
  58. <ul class="tablist">
  59. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  60. <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
  61. <li><a href="modules.html"><span>Reference</span></a></li>
  62. <li>
  63. <div id="MSearchBox" class="MSearchBoxInactive">
  64. <span class="left">
  65. <img id="MSearchSelect" src="search/mag_sel.png"
  66. onmouseover="return searchBox.OnSearchSelectShow()"
  67. onmouseout="return searchBox.OnSearchSelectHide()"
  68. alt=""/>
  69. <input type="text" id="MSearchField" value="Search" accesskey="S"
  70. onfocus="searchBox.OnSearchFieldFocus(true)"
  71. onblur="searchBox.OnSearchFieldFocus(false)"
  72. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  73. </span><span class="right">
  74. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  75. </span>
  76. </div>
  77. </li>
  78. </ul>
  79. </div>
  80. </div><!-- top -->
  81. <div id="side-nav" class="ui-resizable side-nav-resizable">
  82. <div id="nav-tree">
  83. <div id="nav-tree-contents">
  84. <div id="nav-sync" class="sync"></div>
  85. </div>
  86. </div>
  87. <div id="splitbar" style="-moz-user-select:none;"
  88. class="ui-resizable-handle">
  89. </div>
  90. </div>
  91. <script type="text/javascript">
  92. $(document).ready(function(){initNavTree('group___f_i_r___sparse.html','');});
  93. </script>
  94. <div id="doc-content">
  95. <!-- window showing the filter options -->
  96. <div id="MSearchSelectWindow"
  97. onmouseover="return searchBox.OnSearchSelectShow()"
  98. onmouseout="return searchBox.OnSearchSelectHide()"
  99. onkeydown="return searchBox.OnSearchSelectKey(event)">
  100. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  101. <!-- iframe showing the search results (closed by default) -->
  102. <div id="MSearchResultsWindow">
  103. <iframe src="javascript:void(0)" frameborder="0"
  104. name="MSearchResults" id="MSearchResults">
  105. </iframe>
  106. </div>
  107. <div class="header">
  108. <div class="summary">
  109. <a href="#func-members">Functions</a> </div>
  110. <div class="headertitle">
  111. <div class="title">Finite Impulse Response (FIR) Sparse Filters</div> </div>
  112. <div class="ingroups"><a class="el" href="group__group_filters.html">Filtering Functions</a></div></div><!--header-->
  113. <div class="contents">
  114. <table class="memberdecls">
  115. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  116. Functions</h2></td></tr>
  117. <tr class="memitem:ga23a9284de5ee39406713b91d18ac8838"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga23a9284de5ee39406713b91d18ac8838">arm_fir_sparse_f32</a> (<a class="el" href="structarm__fir__sparse__instance__f32.html">arm_fir_sparse_instance_f32</a> *S, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pSrc, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pDst, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pScratchIn, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  118. <tr class="memdesc:ga23a9284de5ee39406713b91d18ac8838"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processing function for the floating-point sparse FIR filter. <a href="#ga23a9284de5ee39406713b91d18ac8838"></a><br/></td></tr>
  119. <tr class="separator:ga23a9284de5ee39406713b91d18ac8838"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:ga86378a08a9d9e1e0e5de77843b34d396"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga86378a08a9d9e1e0e5de77843b34d396">arm_fir_sparse_init_f32</a> (<a class="el" href="structarm__fir__sparse__instance__f32.html">arm_fir_sparse_instance_f32</a> *S, uint16_t numTaps, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pCoeffs, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  121. <tr class="memdesc:ga86378a08a9d9e1e0e5de77843b34d396"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function for the floating-point sparse FIR filter. <a href="#ga86378a08a9d9e1e0e5de77843b34d396"></a><br/></td></tr>
  122. <tr class="separator:ga86378a08a9d9e1e0e5de77843b34d396"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:ga5eaa80bf72bcccef5a2c5fc6648d1baa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga5eaa80bf72bcccef5a2c5fc6648d1baa">arm_fir_sparse_init_q15</a> (<a class="el" href="structarm__fir__sparse__instance__q15.html">arm_fir_sparse_instance_q15</a> *S, uint16_t numTaps, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pCoeffs, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  124. <tr class="memdesc:ga5eaa80bf72bcccef5a2c5fc6648d1baa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function for the Q15 sparse FIR filter. <a href="#ga5eaa80bf72bcccef5a2c5fc6648d1baa"></a><br/></td></tr>
  125. <tr class="separator:ga5eaa80bf72bcccef5a2c5fc6648d1baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:ga9a0bb2134bc85d3e55c6be6d946ee634"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga9a0bb2134bc85d3e55c6be6d946ee634">arm_fir_sparse_init_q31</a> (<a class="el" href="structarm__fir__sparse__instance__q31.html">arm_fir_sparse_instance_q31</a> *S, uint16_t numTaps, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pCoeffs, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  127. <tr class="memdesc:ga9a0bb2134bc85d3e55c6be6d946ee634"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function for the Q31 sparse FIR filter. <a href="#ga9a0bb2134bc85d3e55c6be6d946ee634"></a><br/></td></tr>
  128. <tr class="separator:ga9a0bb2134bc85d3e55c6be6d946ee634"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:ga98f5c1a097d4572ce4ff3b0c58ebcdbd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga98f5c1a097d4572ce4ff3b0c58ebcdbd">arm_fir_sparse_init_q7</a> (<a class="el" href="structarm__fir__sparse__instance__q7.html">arm_fir_sparse_instance_q7</a> *S, uint16_t numTaps, <a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *pCoeffs, <a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  130. <tr class="memdesc:ga98f5c1a097d4572ce4ff3b0c58ebcdbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function for the Q7 sparse FIR filter. <a href="#ga98f5c1a097d4572ce4ff3b0c58ebcdbd"></a><br/></td></tr>
  131. <tr class="separator:ga98f5c1a097d4572ce4ff3b0c58ebcdbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:ga2bffda2e156e72427e19276cd9c3d3cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga2bffda2e156e72427e19276cd9c3d3cc">arm_fir_sparse_q15</a> (<a class="el" href="structarm__fir__sparse__instance__q15.html">arm_fir_sparse_instance_q15</a> *S, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pSrc, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pDst, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pScratchIn, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pScratchOut, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  133. <tr class="memdesc:ga2bffda2e156e72427e19276cd9c3d3cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processing function for the Q15 sparse FIR filter. <a href="#ga2bffda2e156e72427e19276cd9c3d3cc"></a><br/></td></tr>
  134. <tr class="separator:ga2bffda2e156e72427e19276cd9c3d3cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:ga03e9c2f0f35ad67d20bac66be9f920ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#ga03e9c2f0f35ad67d20bac66be9f920ec">arm_fir_sparse_q31</a> (<a class="el" href="structarm__fir__sparse__instance__q31.html">arm_fir_sparse_instance_q31</a> *S, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pSrc, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pDst, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pScratchIn, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  136. <tr class="memdesc:ga03e9c2f0f35ad67d20bac66be9f920ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processing function for the Q31 sparse FIR filter. <a href="#ga03e9c2f0f35ad67d20bac66be9f920ec"></a><br/></td></tr>
  137. <tr class="separator:ga03e9c2f0f35ad67d20bac66be9f920ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:gae86c145efc2d9ec32dc6d8c1ad2ccb3c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_i_r___sparse.html#gae86c145efc2d9ec32dc6d8c1ad2ccb3c">arm_fir_sparse_q7</a> (<a class="el" href="structarm__fir__sparse__instance__q7.html">arm_fir_sparse_instance_q7</a> *S, <a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *pSrc, <a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *pDst, <a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *pScratchIn, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pScratchOut, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr>
  139. <tr class="memdesc:gae86c145efc2d9ec32dc6d8c1ad2ccb3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processing function for the Q7 sparse FIR filter. <a href="#gae86c145efc2d9ec32dc6d8c1ad2ccb3c"></a><br/></td></tr>
  140. <tr class="separator:gae86c145efc2d9ec32dc6d8c1ad2ccb3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. </table>
  142. <a name="details" id="details"></a><h2 class="groupheader">Description</h2>
  143. <p>This group of functions implements sparse FIR filters. Sparse FIR filters are equivalent to standard FIR filters except that most of the coefficients are equal to zero. Sparse filters are used for simulating reflections in communications and audio applications.</p>
  144. <p>There are separate functions for Q7, Q15, Q31, and floating-point data types. The functions operate on blocks of input and output data and each call to the function processes <code>blockSize</code> samples through the filter. <code>pSrc</code> and <code>pDst</code> points to input and output arrays respectively containing <code>blockSize</code> values.</p>
  145. <dl class="section user"><dt>Algorithm: </dt><dd>The sparse filter instant structure contains an array of tap indices <code>pTapDelay</code> which specifies the locations of the non-zero coefficients. This is in addition to the coefficient array <code>b</code>. The implementation essentially skips the multiplications by zero and leads to an efficient realization. <pre>
  146. y[n] = b[0] * x[n-pTapDelay[0]] + b[1] * x[n-pTapDelay[1]] + b[2] * x[n-pTapDelay[2]] + ...+ b[numTaps-1] * x[n-pTapDelay[numTaps-1]]
  147. </pre> </dd></dl>
  148. <dl class="section user"><dt></dt><dd><div class="image">
  149. <img src="FIRSparse.gif" alt="FIRSparse.gif"/>
  150. <div class="caption">
  151. Sparse FIR filter. b[n] represents the filter coefficients</div></div>
  152. </dd></dl>
  153. <dl class="section user"><dt></dt><dd><code>pCoeffs</code> points to a coefficient array of size <code>numTaps</code>; <code>pTapDelay</code> points to an array of nonzero indices and is also of size <code>numTaps</code>; <code>pState</code> points to a state array of size <code>maxDelay + blockSize</code>, where <code>maxDelay</code> is the largest offset value that is ever used in the <code>pTapDelay</code> array. Some of the processing functions also require temporary working buffers.</dd></dl>
  154. <dl class="section user"><dt>Instance Structure </dt><dd>The coefficients and state variables for a filter are stored together in an instance data structure. A separate instance structure must be defined for each filter. Coefficient and offset arrays may be shared among several instances while state variable arrays cannot be shared. There are separate instance structure declarations for each of the 4 supported data types.</dd></dl>
  155. <dl class="section user"><dt>Initialization Functions </dt><dd>There is also an associated initialization function for each data type. The initialization function performs the following operations:<ul>
  156. <li>Sets the values of the internal structure fields.</li>
  157. <li>Zeros out the values in the state buffer. To do this manually without calling the init function, assign the follow subfields of the instance structure: numTaps, pCoeffs, pTapDelay, maxDelay, stateIndex, pState. Also set all of the values in pState to zero.</li>
  158. </ul>
  159. </dd></dl>
  160. <dl class="section user"><dt></dt><dd>Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed into a const data section. To place an instance structure into a const data section, the instance structure must be manually initialized. Set the values in the state buffer to zeros before static initialization. The code below statically initializes each of the 4 different data type filter instance structures <pre>
  161. *arm_fir_sparse_instance_f32 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay};
  162. *arm_fir_sparse_instance_q31 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay};
  163. *arm_fir_sparse_instance_q15 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay};
  164. *arm_fir_sparse_instance_q7 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay};
  165. </pre> </dd></dl>
  166. <dl class="section user"><dt></dt><dd></dd></dl>
  167. <dl class="section user"><dt>Fixed-Point Behavior </dt><dd>Care must be taken when using the fixed-point versions of the sparse FIR filter functions. In particular, the overflow and saturation behavior of the accumulator used in each function must be considered. Refer to the function specific documentation below for usage guidelines. </dd></dl>
  168. <h2 class="groupheader">Function Documentation</h2>
  169. <a class="anchor" id="ga23a9284de5ee39406713b91d18ac8838"></a>
  170. <div class="memitem">
  171. <div class="memproto">
  172. <table class="memname">
  173. <tr>
  174. <td class="memname">void arm_fir_sparse_f32 </td>
  175. <td>(</td>
  176. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__f32.html">arm_fir_sparse_instance_f32</a> *&#160;</td>
  177. <td class="paramname"><em>S</em>, </td>
  178. </tr>
  179. <tr>
  180. <td class="paramkey"></td>
  181. <td></td>
  182. <td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
  183. <td class="paramname"><em>pSrc</em>, </td>
  184. </tr>
  185. <tr>
  186. <td class="paramkey"></td>
  187. <td></td>
  188. <td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
  189. <td class="paramname"><em>pDst</em>, </td>
  190. </tr>
  191. <tr>
  192. <td class="paramkey"></td>
  193. <td></td>
  194. <td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
  195. <td class="paramname"><em>pScratchIn</em>, </td>
  196. </tr>
  197. <tr>
  198. <td class="paramkey"></td>
  199. <td></td>
  200. <td class="paramtype">uint32_t&#160;</td>
  201. <td class="paramname"><em>blockSize</em>&#160;</td>
  202. </tr>
  203. <tr>
  204. <td></td>
  205. <td>)</td>
  206. <td></td><td></td>
  207. </tr>
  208. </table>
  209. </div><div class="memdoc">
  210. <dl class="params"><dt>Parameters</dt><dd>
  211. <table class="params">
  212. <tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the floating-point sparse FIR structure. </td></tr>
  213. <tr><td class="paramdir">[in]</td><td class="paramname">*pSrc</td><td>points to the block of input data. </td></tr>
  214. <tr><td class="paramdir">[out]</td><td class="paramname">*pDst</td><td>points to the block of output data </td></tr>
  215. <tr><td class="paramdir">[in]</td><td class="paramname">*pScratchIn</td><td>points to a temporary buffer of size blockSize. </td></tr>
  216. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of input samples to process per call. </td></tr>
  217. </table>
  218. </dd>
  219. </dl>
  220. <dl class="section return"><dt>Returns</dt><dd>none. </dd></dl>
  221. <p>References <a class="el" href="arm__math_8h.html#ae469fac5e1df35f8bcf1b3d7c3136484">arm_circularRead_f32()</a>, <a class="el" href="arm__math_8h.html#a6ff56c0896ce00712ba8f2fcf72cacd3">arm_circularWrite_f32()</a>, <a class="el" href="arm__fir__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#af8b8c775f4084c36774f06c082b4c078">arm_fir_sparse_instance_f32::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#a5e19e7f234ac30a3db843352bf2a8515">arm_fir_sparse_instance_f32::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#a04af7c738dfb0882ad102fcad501d94a">arm_fir_sparse_instance_f32::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#a794af0916666d11cc564d6df08553555">arm_fir_sparse_instance_f32::pState</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#aaa54ae67e5d10c6dd0d697945c638d31">arm_fir_sparse_instance_f32::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__f32.html#a57585aeca9dc8686e08df2865375a86d">arm_fir_sparse_instance_f32::stateIndex</a>.</p>
  222. </div>
  223. </div>
  224. <a class="anchor" id="ga86378a08a9d9e1e0e5de77843b34d396"></a>
  225. <div class="memitem">
  226. <div class="memproto">
  227. <table class="memname">
  228. <tr>
  229. <td class="memname">void arm_fir_sparse_init_f32 </td>
  230. <td>(</td>
  231. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__f32.html">arm_fir_sparse_instance_f32</a> *&#160;</td>
  232. <td class="paramname"><em>S</em>, </td>
  233. </tr>
  234. <tr>
  235. <td class="paramkey"></td>
  236. <td></td>
  237. <td class="paramtype">uint16_t&#160;</td>
  238. <td class="paramname"><em>numTaps</em>, </td>
  239. </tr>
  240. <tr>
  241. <td class="paramkey"></td>
  242. <td></td>
  243. <td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
  244. <td class="paramname"><em>pCoeffs</em>, </td>
  245. </tr>
  246. <tr>
  247. <td class="paramkey"></td>
  248. <td></td>
  249. <td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
  250. <td class="paramname"><em>pState</em>, </td>
  251. </tr>
  252. <tr>
  253. <td class="paramkey"></td>
  254. <td></td>
  255. <td class="paramtype">int32_t *&#160;</td>
  256. <td class="paramname"><em>pTapDelay</em>, </td>
  257. </tr>
  258. <tr>
  259. <td class="paramkey"></td>
  260. <td></td>
  261. <td class="paramtype">uint16_t&#160;</td>
  262. <td class="paramname"><em>maxDelay</em>, </td>
  263. </tr>
  264. <tr>
  265. <td class="paramkey"></td>
  266. <td></td>
  267. <td class="paramtype">uint32_t&#160;</td>
  268. <td class="paramname"><em>blockSize</em>&#160;</td>
  269. </tr>
  270. <tr>
  271. <td></td>
  272. <td>)</td>
  273. <td></td><td></td>
  274. </tr>
  275. </table>
  276. </div><div class="memdoc">
  277. <dl class="params"><dt>Parameters</dt><dd>
  278. <table class="params">
  279. <tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of the floating-point sparse FIR structure. </td></tr>
  280. <tr><td class="paramdir">[in]</td><td class="paramname">numTaps</td><td>number of nonzero coefficients in the filter. </td></tr>
  281. <tr><td class="paramdir">[in]</td><td class="paramname">*pCoeffs</td><td>points to the array of filter coefficients. </td></tr>
  282. <tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to the state buffer. </td></tr>
  283. <tr><td class="paramdir">[in]</td><td class="paramname">*pTapDelay</td><td>points to the array of offset times. </td></tr>
  284. <tr><td class="paramdir">[in]</td><td class="paramname">maxDelay</td><td>maximum offset time supported. </td></tr>
  285. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of samples that will be processed per block. </td></tr>
  286. </table>
  287. </dd>
  288. </dl>
  289. <dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
  290. <p><b>Description:</b> </p>
  291. <dl class="section user"><dt></dt><dd><code>pCoeffs</code> holds the filter coefficients and has length <code>numTaps</code>. <code>pState</code> holds the filter's state variables and must be of length <code>maxDelay + blockSize</code>, where <code>maxDelay</code> is the maximum number of delay line values. <code>blockSize</code> is the number of samples processed by the <code><a class="el" href="group___f_i_r___sparse.html#ga23a9284de5ee39406713b91d18ac8838" title="Processing function for the floating-point sparse FIR filter.">arm_fir_sparse_f32()</a></code> function. </dd></dl>
  292. <p>References <a class="el" href="structarm__fir__sparse__instance__f32.html#af8b8c775f4084c36774f06c082b4c078">arm_fir_sparse_instance_f32::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#a5e19e7f234ac30a3db843352bf2a8515">arm_fir_sparse_instance_f32::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#a04af7c738dfb0882ad102fcad501d94a">arm_fir_sparse_instance_f32::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#a794af0916666d11cc564d6df08553555">arm_fir_sparse_instance_f32::pState</a>, <a class="el" href="structarm__fir__sparse__instance__f32.html#aaa54ae67e5d10c6dd0d697945c638d31">arm_fir_sparse_instance_f32::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__f32.html#a57585aeca9dc8686e08df2865375a86d">arm_fir_sparse_instance_f32::stateIndex</a>.</p>
  293. </div>
  294. </div>
  295. <a class="anchor" id="ga5eaa80bf72bcccef5a2c5fc6648d1baa"></a>
  296. <div class="memitem">
  297. <div class="memproto">
  298. <table class="memname">
  299. <tr>
  300. <td class="memname">void arm_fir_sparse_init_q15 </td>
  301. <td>(</td>
  302. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__q15.html">arm_fir_sparse_instance_q15</a> *&#160;</td>
  303. <td class="paramname"><em>S</em>, </td>
  304. </tr>
  305. <tr>
  306. <td class="paramkey"></td>
  307. <td></td>
  308. <td class="paramtype">uint16_t&#160;</td>
  309. <td class="paramname"><em>numTaps</em>, </td>
  310. </tr>
  311. <tr>
  312. <td class="paramkey"></td>
  313. <td></td>
  314. <td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
  315. <td class="paramname"><em>pCoeffs</em>, </td>
  316. </tr>
  317. <tr>
  318. <td class="paramkey"></td>
  319. <td></td>
  320. <td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
  321. <td class="paramname"><em>pState</em>, </td>
  322. </tr>
  323. <tr>
  324. <td class="paramkey"></td>
  325. <td></td>
  326. <td class="paramtype">int32_t *&#160;</td>
  327. <td class="paramname"><em>pTapDelay</em>, </td>
  328. </tr>
  329. <tr>
  330. <td class="paramkey"></td>
  331. <td></td>
  332. <td class="paramtype">uint16_t&#160;</td>
  333. <td class="paramname"><em>maxDelay</em>, </td>
  334. </tr>
  335. <tr>
  336. <td class="paramkey"></td>
  337. <td></td>
  338. <td class="paramtype">uint32_t&#160;</td>
  339. <td class="paramname"><em>blockSize</em>&#160;</td>
  340. </tr>
  341. <tr>
  342. <td></td>
  343. <td>)</td>
  344. <td></td><td></td>
  345. </tr>
  346. </table>
  347. </div><div class="memdoc">
  348. <dl class="params"><dt>Parameters</dt><dd>
  349. <table class="params">
  350. <tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of the Q15 sparse FIR structure. </td></tr>
  351. <tr><td class="paramdir">[in]</td><td class="paramname">numTaps</td><td>number of nonzero coefficients in the filter. </td></tr>
  352. <tr><td class="paramdir">[in]</td><td class="paramname">*pCoeffs</td><td>points to the array of filter coefficients. </td></tr>
  353. <tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to the state buffer. </td></tr>
  354. <tr><td class="paramdir">[in]</td><td class="paramname">*pTapDelay</td><td>points to the array of offset times. </td></tr>
  355. <tr><td class="paramdir">[in]</td><td class="paramname">maxDelay</td><td>maximum offset time supported. </td></tr>
  356. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of samples that will be processed per block. </td></tr>
  357. </table>
  358. </dd>
  359. </dl>
  360. <dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
  361. <p><b>Description:</b> </p>
  362. <dl class="section user"><dt></dt><dd><code>pCoeffs</code> holds the filter coefficients and has length <code>numTaps</code>. <code>pState</code> holds the filter's state variables and must be of length <code>maxDelay + blockSize</code>, where <code>maxDelay</code> is the maximum number of delay line values. <code>blockSize</code> is the number of words processed by <code><a class="el" href="group___f_i_r___sparse.html#ga2bffda2e156e72427e19276cd9c3d3cc" title="Processing function for the Q15 sparse FIR filter.">arm_fir_sparse_q15()</a></code> function. </dd></dl>
  363. <p>References <a class="el" href="structarm__fir__sparse__instance__q15.html#ad14cc1070eecf7e1926d8f67a8273182">arm_fir_sparse_instance_q15::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#a0f66b126dd8b85f7467cfb01b7bc4d77">arm_fir_sparse_instance_q15::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#a78a6565473b5f0b8c77c3f0f58a76069">arm_fir_sparse_instance_q15::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#a98b92b0f5208110129b9a67b1db90408">arm_fir_sparse_instance_q15::pState</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#aeab2855176c6efdb231a73a3672837d5">arm_fir_sparse_instance_q15::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__q15.html#a89487f28cab52637426024005e478985">arm_fir_sparse_instance_q15::stateIndex</a>.</p>
  364. </div>
  365. </div>
  366. <a class="anchor" id="ga9a0bb2134bc85d3e55c6be6d946ee634"></a>
  367. <div class="memitem">
  368. <div class="memproto">
  369. <table class="memname">
  370. <tr>
  371. <td class="memname">void arm_fir_sparse_init_q31 </td>
  372. <td>(</td>
  373. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__q31.html">arm_fir_sparse_instance_q31</a> *&#160;</td>
  374. <td class="paramname"><em>S</em>, </td>
  375. </tr>
  376. <tr>
  377. <td class="paramkey"></td>
  378. <td></td>
  379. <td class="paramtype">uint16_t&#160;</td>
  380. <td class="paramname"><em>numTaps</em>, </td>
  381. </tr>
  382. <tr>
  383. <td class="paramkey"></td>
  384. <td></td>
  385. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  386. <td class="paramname"><em>pCoeffs</em>, </td>
  387. </tr>
  388. <tr>
  389. <td class="paramkey"></td>
  390. <td></td>
  391. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  392. <td class="paramname"><em>pState</em>, </td>
  393. </tr>
  394. <tr>
  395. <td class="paramkey"></td>
  396. <td></td>
  397. <td class="paramtype">int32_t *&#160;</td>
  398. <td class="paramname"><em>pTapDelay</em>, </td>
  399. </tr>
  400. <tr>
  401. <td class="paramkey"></td>
  402. <td></td>
  403. <td class="paramtype">uint16_t&#160;</td>
  404. <td class="paramname"><em>maxDelay</em>, </td>
  405. </tr>
  406. <tr>
  407. <td class="paramkey"></td>
  408. <td></td>
  409. <td class="paramtype">uint32_t&#160;</td>
  410. <td class="paramname"><em>blockSize</em>&#160;</td>
  411. </tr>
  412. <tr>
  413. <td></td>
  414. <td>)</td>
  415. <td></td><td></td>
  416. </tr>
  417. </table>
  418. </div><div class="memdoc">
  419. <dl class="params"><dt>Parameters</dt><dd>
  420. <table class="params">
  421. <tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of the Q31 sparse FIR structure. </td></tr>
  422. <tr><td class="paramdir">[in]</td><td class="paramname">numTaps</td><td>number of nonzero coefficients in the filter. </td></tr>
  423. <tr><td class="paramdir">[in]</td><td class="paramname">*pCoeffs</td><td>points to the array of filter coefficients. </td></tr>
  424. <tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to the state buffer. </td></tr>
  425. <tr><td class="paramdir">[in]</td><td class="paramname">*pTapDelay</td><td>points to the array of offset times. </td></tr>
  426. <tr><td class="paramdir">[in]</td><td class="paramname">maxDelay</td><td>maximum offset time supported. </td></tr>
  427. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of samples that will be processed per block. </td></tr>
  428. </table>
  429. </dd>
  430. </dl>
  431. <dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
  432. <p><b>Description:</b> </p>
  433. <dl class="section user"><dt></dt><dd><code>pCoeffs</code> holds the filter coefficients and has length <code>numTaps</code>. <code>pState</code> holds the filter's state variables and must be of length <code>maxDelay + blockSize</code>, where <code>maxDelay</code> is the maximum number of delay line values. <code>blockSize</code> is the number of words processed by <code><a class="el" href="group___f_i_r___sparse.html#ga03e9c2f0f35ad67d20bac66be9f920ec" title="Processing function for the Q31 sparse FIR filter.">arm_fir_sparse_q31()</a></code> function. </dd></dl>
  434. <p>References <a class="el" href="structarm__fir__sparse__instance__q31.html#afdd3a1dc72132c854dc379154b68b674">arm_fir_sparse_instance_q31::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#a07b6c01e58ec6dde384719130d36b0dc">arm_fir_sparse_instance_q31::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#a093d6227f0d1597982cd083fb126f4e0">arm_fir_sparse_instance_q31::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#a830be89daa5a393b225048889aa045d1">arm_fir_sparse_instance_q31::pState</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#ab87ae457adec8f727afefaa2599fc983">arm_fir_sparse_instance_q31::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__q31.html#a557ed9d477e76e4ad2019344f19f568a">arm_fir_sparse_instance_q31::stateIndex</a>.</p>
  435. </div>
  436. </div>
  437. <a class="anchor" id="ga98f5c1a097d4572ce4ff3b0c58ebcdbd"></a>
  438. <div class="memitem">
  439. <div class="memproto">
  440. <table class="memname">
  441. <tr>
  442. <td class="memname">void arm_fir_sparse_init_q7 </td>
  443. <td>(</td>
  444. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__q7.html">arm_fir_sparse_instance_q7</a> *&#160;</td>
  445. <td class="paramname"><em>S</em>, </td>
  446. </tr>
  447. <tr>
  448. <td class="paramkey"></td>
  449. <td></td>
  450. <td class="paramtype">uint16_t&#160;</td>
  451. <td class="paramname"><em>numTaps</em>, </td>
  452. </tr>
  453. <tr>
  454. <td class="paramkey"></td>
  455. <td></td>
  456. <td class="paramtype"><a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *&#160;</td>
  457. <td class="paramname"><em>pCoeffs</em>, </td>
  458. </tr>
  459. <tr>
  460. <td class="paramkey"></td>
  461. <td></td>
  462. <td class="paramtype"><a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *&#160;</td>
  463. <td class="paramname"><em>pState</em>, </td>
  464. </tr>
  465. <tr>
  466. <td class="paramkey"></td>
  467. <td></td>
  468. <td class="paramtype">int32_t *&#160;</td>
  469. <td class="paramname"><em>pTapDelay</em>, </td>
  470. </tr>
  471. <tr>
  472. <td class="paramkey"></td>
  473. <td></td>
  474. <td class="paramtype">uint16_t&#160;</td>
  475. <td class="paramname"><em>maxDelay</em>, </td>
  476. </tr>
  477. <tr>
  478. <td class="paramkey"></td>
  479. <td></td>
  480. <td class="paramtype">uint32_t&#160;</td>
  481. <td class="paramname"><em>blockSize</em>&#160;</td>
  482. </tr>
  483. <tr>
  484. <td></td>
  485. <td>)</td>
  486. <td></td><td></td>
  487. </tr>
  488. </table>
  489. </div><div class="memdoc">
  490. <dl class="params"><dt>Parameters</dt><dd>
  491. <table class="params">
  492. <tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of the Q7 sparse FIR structure. </td></tr>
  493. <tr><td class="paramdir">[in]</td><td class="paramname">numTaps</td><td>number of nonzero coefficients in the filter. </td></tr>
  494. <tr><td class="paramdir">[in]</td><td class="paramname">*pCoeffs</td><td>points to the array of filter coefficients. </td></tr>
  495. <tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to the state buffer. </td></tr>
  496. <tr><td class="paramdir">[in]</td><td class="paramname">*pTapDelay</td><td>points to the array of offset times. </td></tr>
  497. <tr><td class="paramdir">[in]</td><td class="paramname">maxDelay</td><td>maximum offset time supported. </td></tr>
  498. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of samples that will be processed per block. </td></tr>
  499. </table>
  500. </dd>
  501. </dl>
  502. <dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
  503. <p><b>Description:</b> </p>
  504. <dl class="section user"><dt></dt><dd><code>pCoeffs</code> holds the filter coefficients and has length <code>numTaps</code>. <code>pState</code> holds the filter's state variables and must be of length <code>maxDelay + blockSize</code>, where <code>maxDelay</code> is the maximum number of delay line values. <code>blockSize</code> is the number of samples processed by the <code><a class="el" href="group___f_i_r___sparse.html#gae86c145efc2d9ec32dc6d8c1ad2ccb3c" title="Processing function for the Q7 sparse FIR filter.">arm_fir_sparse_q7()</a></code> function. </dd></dl>
  505. <p>References <a class="el" href="structarm__fir__sparse__instance__q7.html#af74dacc1d34c078283e50f2530eb91df">arm_fir_sparse_instance_q7::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#a54cdd27ca1c672b126c38763ce678b1c">arm_fir_sparse_instance_q7::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#a3dac86f15e33553e8f3e19e0d712bae5">arm_fir_sparse_instance_q7::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#a18072cf3ef3666d588f0d49512f2b28f">arm_fir_sparse_instance_q7::pState</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#ac625393c84bc0342ffdf26fc4eba1ac1">arm_fir_sparse_instance_q7::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__q7.html#a2d2e65473fe3a3f2b953b4e0b60824df">arm_fir_sparse_instance_q7::stateIndex</a>.</p>
  506. </div>
  507. </div>
  508. <a class="anchor" id="ga2bffda2e156e72427e19276cd9c3d3cc"></a>
  509. <div class="memitem">
  510. <div class="memproto">
  511. <table class="memname">
  512. <tr>
  513. <td class="memname">void arm_fir_sparse_q15 </td>
  514. <td>(</td>
  515. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__q15.html">arm_fir_sparse_instance_q15</a> *&#160;</td>
  516. <td class="paramname"><em>S</em>, </td>
  517. </tr>
  518. <tr>
  519. <td class="paramkey"></td>
  520. <td></td>
  521. <td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
  522. <td class="paramname"><em>pSrc</em>, </td>
  523. </tr>
  524. <tr>
  525. <td class="paramkey"></td>
  526. <td></td>
  527. <td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
  528. <td class="paramname"><em>pDst</em>, </td>
  529. </tr>
  530. <tr>
  531. <td class="paramkey"></td>
  532. <td></td>
  533. <td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
  534. <td class="paramname"><em>pScratchIn</em>, </td>
  535. </tr>
  536. <tr>
  537. <td class="paramkey"></td>
  538. <td></td>
  539. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  540. <td class="paramname"><em>pScratchOut</em>, </td>
  541. </tr>
  542. <tr>
  543. <td class="paramkey"></td>
  544. <td></td>
  545. <td class="paramtype">uint32_t&#160;</td>
  546. <td class="paramname"><em>blockSize</em>&#160;</td>
  547. </tr>
  548. <tr>
  549. <td></td>
  550. <td>)</td>
  551. <td></td><td></td>
  552. </tr>
  553. </table>
  554. </div><div class="memdoc">
  555. <dl class="params"><dt>Parameters</dt><dd>
  556. <table class="params">
  557. <tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the Q15 sparse FIR structure. </td></tr>
  558. <tr><td class="paramdir">[in]</td><td class="paramname">*pSrc</td><td>points to the block of input data. </td></tr>
  559. <tr><td class="paramdir">[out]</td><td class="paramname">*pDst</td><td>points to the block of output data </td></tr>
  560. <tr><td class="paramdir">[in]</td><td class="paramname">*pScratchIn</td><td>points to a temporary buffer of size blockSize. </td></tr>
  561. <tr><td class="paramdir">[in]</td><td class="paramname">*pScratchOut</td><td>points to a temporary buffer of size blockSize. </td></tr>
  562. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of input samples to process per call. </td></tr>
  563. </table>
  564. </dd>
  565. </dl>
  566. <dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
  567. <p><b>Scaling and Overflow Behavior:</b> </p>
  568. <dl class="section user"><dt></dt><dd>The function is implemented using an internal 32-bit accumulator. The 1.15 x 1.15 multiplications yield a 2.30 result and these are added to a 2.30 accumulator. Thus the full precision of the multiplications is maintained but there is only a single guard bit in the accumulator. If the accumulator result overflows it will wrap around rather than saturate. After all multiply-accumulates are performed, the 2.30 accumulator is truncated to 2.15 format and then saturated to 1.15 format. In order to avoid overflows the input signal or coefficients must be scaled down by log2(numTaps) bits. </dd></dl>
  569. <p>References <a class="el" href="arm__math_8h.html#a9de2e0a5785be82866bcb96012282248">__SIMD32</a>, <a class="el" href="arm__math_8h.html#ad5fb134f83f2c802261f172e3dceb131">arm_circularRead_q15()</a>, <a class="el" href="arm__math_8h.html#a3ba2d215477e692def7fda46dda883ed">arm_circularWrite_q15()</a>, <a class="el" href="arm__fir__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#ad14cc1070eecf7e1926d8f67a8273182">arm_fir_sparse_instance_q15::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#a0f66b126dd8b85f7467cfb01b7bc4d77">arm_fir_sparse_instance_q15::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#a78a6565473b5f0b8c77c3f0f58a76069">arm_fir_sparse_instance_q15::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#a98b92b0f5208110129b9a67b1db90408">arm_fir_sparse_instance_q15::pState</a>, <a class="el" href="structarm__fir__sparse__instance__q15.html#aeab2855176c6efdb231a73a3672837d5">arm_fir_sparse_instance_q15::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__q15.html#a89487f28cab52637426024005e478985">arm_fir_sparse_instance_q15::stateIndex</a>.</p>
  570. </div>
  571. </div>
  572. <a class="anchor" id="ga03e9c2f0f35ad67d20bac66be9f920ec"></a>
  573. <div class="memitem">
  574. <div class="memproto">
  575. <table class="memname">
  576. <tr>
  577. <td class="memname">void arm_fir_sparse_q31 </td>
  578. <td>(</td>
  579. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__q31.html">arm_fir_sparse_instance_q31</a> *&#160;</td>
  580. <td class="paramname"><em>S</em>, </td>
  581. </tr>
  582. <tr>
  583. <td class="paramkey"></td>
  584. <td></td>
  585. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  586. <td class="paramname"><em>pSrc</em>, </td>
  587. </tr>
  588. <tr>
  589. <td class="paramkey"></td>
  590. <td></td>
  591. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  592. <td class="paramname"><em>pDst</em>, </td>
  593. </tr>
  594. <tr>
  595. <td class="paramkey"></td>
  596. <td></td>
  597. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  598. <td class="paramname"><em>pScratchIn</em>, </td>
  599. </tr>
  600. <tr>
  601. <td class="paramkey"></td>
  602. <td></td>
  603. <td class="paramtype">uint32_t&#160;</td>
  604. <td class="paramname"><em>blockSize</em>&#160;</td>
  605. </tr>
  606. <tr>
  607. <td></td>
  608. <td>)</td>
  609. <td></td><td></td>
  610. </tr>
  611. </table>
  612. </div><div class="memdoc">
  613. <dl class="params"><dt>Parameters</dt><dd>
  614. <table class="params">
  615. <tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the Q31 sparse FIR structure. </td></tr>
  616. <tr><td class="paramdir">[in]</td><td class="paramname">*pSrc</td><td>points to the block of input data. </td></tr>
  617. <tr><td class="paramdir">[out]</td><td class="paramname">*pDst</td><td>points to the block of output data </td></tr>
  618. <tr><td class="paramdir">[in]</td><td class="paramname">*pScratchIn</td><td>points to a temporary buffer of size blockSize. </td></tr>
  619. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of input samples to process per call. </td></tr>
  620. </table>
  621. </dd>
  622. </dl>
  623. <dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
  624. <p><b>Scaling and Overflow Behavior:</b> </p>
  625. <dl class="section user"><dt></dt><dd>The function is implemented using an internal 32-bit accumulator. The 1.31 x 1.31 multiplications are truncated to 2.30 format. This leads to loss of precision on the intermediate multiplications and provides only a single guard bit. If the accumulator result overflows, it wraps around rather than saturate. In order to avoid overflows the input signal or coefficients must be scaled down by log2(numTaps) bits. </dd></dl>
  626. <p>References <a class="el" href="arm__math_8h.html#ae469fac5e1df35f8bcf1b3d7c3136484">arm_circularRead_f32()</a>, <a class="el" href="arm__math_8h.html#a6ff56c0896ce00712ba8f2fcf72cacd3">arm_circularWrite_f32()</a>, <a class="el" href="arm__fir__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#afdd3a1dc72132c854dc379154b68b674">arm_fir_sparse_instance_q31::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#a07b6c01e58ec6dde384719130d36b0dc">arm_fir_sparse_instance_q31::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#a093d6227f0d1597982cd083fb126f4e0">arm_fir_sparse_instance_q31::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#a830be89daa5a393b225048889aa045d1">arm_fir_sparse_instance_q31::pState</a>, <a class="el" href="structarm__fir__sparse__instance__q31.html#ab87ae457adec8f727afefaa2599fc983">arm_fir_sparse_instance_q31::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__q31.html#a557ed9d477e76e4ad2019344f19f568a">arm_fir_sparse_instance_q31::stateIndex</a>.</p>
  627. </div>
  628. </div>
  629. <a class="anchor" id="gae86c145efc2d9ec32dc6d8c1ad2ccb3c"></a>
  630. <div class="memitem">
  631. <div class="memproto">
  632. <table class="memname">
  633. <tr>
  634. <td class="memname">void arm_fir_sparse_q7 </td>
  635. <td>(</td>
  636. <td class="paramtype"><a class="el" href="structarm__fir__sparse__instance__q7.html">arm_fir_sparse_instance_q7</a> *&#160;</td>
  637. <td class="paramname"><em>S</em>, </td>
  638. </tr>
  639. <tr>
  640. <td class="paramkey"></td>
  641. <td></td>
  642. <td class="paramtype"><a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *&#160;</td>
  643. <td class="paramname"><em>pSrc</em>, </td>
  644. </tr>
  645. <tr>
  646. <td class="paramkey"></td>
  647. <td></td>
  648. <td class="paramtype"><a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *&#160;</td>
  649. <td class="paramname"><em>pDst</em>, </td>
  650. </tr>
  651. <tr>
  652. <td class="paramkey"></td>
  653. <td></td>
  654. <td class="paramtype"><a class="el" href="arm__math_8h.html#ae541b6f232c305361e9b416fc9eed263">q7_t</a> *&#160;</td>
  655. <td class="paramname"><em>pScratchIn</em>, </td>
  656. </tr>
  657. <tr>
  658. <td class="paramkey"></td>
  659. <td></td>
  660. <td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
  661. <td class="paramname"><em>pScratchOut</em>, </td>
  662. </tr>
  663. <tr>
  664. <td class="paramkey"></td>
  665. <td></td>
  666. <td class="paramtype">uint32_t&#160;</td>
  667. <td class="paramname"><em>blockSize</em>&#160;</td>
  668. </tr>
  669. <tr>
  670. <td></td>
  671. <td>)</td>
  672. <td></td><td></td>
  673. </tr>
  674. </table>
  675. </div><div class="memdoc">
  676. <dl class="params"><dt>Parameters</dt><dd>
  677. <table class="params">
  678. <tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the Q7 sparse FIR structure. </td></tr>
  679. <tr><td class="paramdir">[in]</td><td class="paramname">*pSrc</td><td>points to the block of input data. </td></tr>
  680. <tr><td class="paramdir">[out]</td><td class="paramname">*pDst</td><td>points to the block of output data </td></tr>
  681. <tr><td class="paramdir">[in]</td><td class="paramname">*pScratchIn</td><td>points to a temporary buffer of size blockSize. </td></tr>
  682. <tr><td class="paramdir">[in]</td><td class="paramname">*pScratchOut</td><td>points to a temporary buffer of size blockSize. </td></tr>
  683. <tr><td class="paramdir">[in]</td><td class="paramname">blockSize</td><td>number of input samples to process per call. </td></tr>
  684. </table>
  685. </dd>
  686. </dl>
  687. <dl class="section return"><dt>Returns</dt><dd>none.</dd></dl>
  688. <p><b>Scaling and Overflow Behavior:</b> </p>
  689. <dl class="section user"><dt></dt><dd>The function is implemented using a 32-bit internal accumulator. Both coefficients and state variables are represented in 1.7 format and multiplications yield a 2.14 result. The 2.14 intermediate results are accumulated in a 32-bit accumulator in 18.14 format. There is no risk of internal overflow with this approach and the full precision of intermediate multiplications is preserved. The accumulator is then converted to 18.7 format by discarding the low 7 bits. Finally, the result is truncated to 1.7 format. </dd></dl>
  690. <p>References <a class="el" href="arm__math_8h.html#a3ebff224ad44c217fde9f530342e2960">__PACKq7</a>, <a class="el" href="arm__math_8h.html#a9de2e0a5785be82866bcb96012282248">__SIMD32</a>, <a class="el" href="arm__math_8h.html#a30aa80ea20abe71f3afa99f2f0391ed5">arm_circularRead_q7()</a>, <a class="el" href="arm__math_8h.html#addba85b1f7fbd472fd00ddd9ce43aea8">arm_circularWrite_q7()</a>, <a class="el" href="arm__fir__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#af74dacc1d34c078283e50f2530eb91df">arm_fir_sparse_instance_q7::maxDelay</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#a54cdd27ca1c672b126c38763ce678b1c">arm_fir_sparse_instance_q7::numTaps</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#a3dac86f15e33553e8f3e19e0d712bae5">arm_fir_sparse_instance_q7::pCoeffs</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#a18072cf3ef3666d588f0d49512f2b28f">arm_fir_sparse_instance_q7::pState</a>, <a class="el" href="structarm__fir__sparse__instance__q7.html#ac625393c84bc0342ffdf26fc4eba1ac1">arm_fir_sparse_instance_q7::pTapDelay</a>, and <a class="el" href="structarm__fir__sparse__instance__q7.html#a2d2e65473fe3a3f2b953b4e0b60824df">arm_fir_sparse_instance_q7::stateIndex</a>.</p>
  691. </div>
  692. </div>
  693. </div><!-- contents -->
  694. </div><!-- doc-content -->
  695. <!-- start footer part -->
  696. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  697. <ul>
  698. <li class="footer">Generated on Tue Sep 23 2014 18:52:43 for CMSIS-DSP by ARM Ltd. All rights reserved.
  699. <!--
  700. <a href="http://www.doxygen.org/index.html">
  701. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2
  702. -->
  703. </li>
  704. </ul>
  705. </div>
  706. </body>
  707. </html>