ver_butterworth.html

来自「verilog的入门级别的例子(转载)」· HTML 代码 · 共 333 行 · 第 1/2 页

HTML
333
字号
<P>Butterworth filters are also known as "maximally flat" filters because they have no passband ripple. They also have a monotonic response in both the stopband and passband. Butterworth filters tradeoff roll off steepness for their no-ripple characteristic.</P><p>The complexity of calculating the result of the Butterworth filter can be greatly reduced if the filter is broken down into several second order systems known as biquads. The higher the filter order, the better its characteristics, but the more complex it is to implement. By breaking a complex filter into biquads, this complexity is greatly reduced.</p><p>The transfer function of a Butterworth filter is shown below:</p><img src="images/ver-butterworth_eqn.gif" alt="" width="172" height="59" border="0"><p>Since the coefficient for the <i>z</i><font size="-1"><SUP>-1</SUP></font> term is twice that of the other terms in the numerator, it can be implemented using a series of shift and add operations. This optimization reduces the number of multipliers in each biquad to just two. A gain factor is introduced, but this can be corrected at the end of the cascade chain through a single multiplier.</p><p>This Butterworth infinite impulse response (IIR) filter design uses two biquads to implement a 4<SUP><font size="-1">th</font></SUP> order filter in Stratix<sup>&#153;</sup>. The input is a 12-bit signed integer, the filter coefficients are scaled to 10 bits, and the output is 21 bits wide. See <a href="/literature/an/an215.pdf"><i>AN 215: Implementing High Performance DSP Functions in Stratix Devices</i></a> for details of the implementation.</p><p>Download the files used in this example:</p><ul><li><a href="/patches/examples/verilog/butterworth.zip">Download butterworth.zip</a><li><a href="../download/butterworth_vlog_readme-v1.0.0p1.txt">Download Butterworth IIR Design Example README File</a> </ul><p>Files in the download include:</p><ul><li>butterworth_iir.v - Top-level design file<li>butterworth_iir_biquad.v - Second-order biquad structure<li>two_mult_add.v - Multiply-add function implemented using altmult_add Megafunction<li>fb_adder.v - Adder in the feedback path implemented using the lpm_add_sub Megafunction<li>ff_adder1.v, ff_adder2.v - Adders in the feedforward path implemented using the lpm_add_sub Megafunction<li>gain_blk.v - Gain block compensates for the gain factor at the end of the filtering stage<li>butter_iir.m - MATLAB script to verify functionality of design</ul><p>Figure 1 contains the butterworth_iir top-level block diagram.</p><p><b><i>Figure 1. butterworth_iir Top-Level Block Diagram</i></b></p><img src="images/ver-butterworth_fig1.gif" alt="Figure 1. butterworth_iir Top-Level Block Diagram" width="543" height="149" border="0"><p>Table 1 shows the Butterworth IIR design example port listing.</p><br><table width="100%" border="1" cellspacing="0" cellpadding="2">  <tr>     <td colspan="3"><b><i>Table 1. Butterworth IIR Design Example Port Listing</i></b></td>  </tr>  <tr bgcolor="#000099">     <td><b><font color="#FFFFFF">Port Name</font></b></td>    <td align="center"><b><font color="#FFFFFF">Type</font></b></td>    <td align="center"><b><font color="#FFFFFF">Description</font></b></td>  </tr>  <tr>     <td valign="top"><b>x[11..0]</b></td>    <td valign="top" align="center">Input</td>    <td valign="top">The input is a 12-bit signed integer. This is the x[n] time       sample represented as an 18-bit signed input.</td>  </tr>  <tr>     <td valign="top"><b>clk</b></td>    <td valign="top" align="center">Input</td>    <td valign="top">Clock</td>  </tr>  <tr>     <td valign="top"><b>clken</b></td>    <td valign="top" align="center">Input</td>    <td valign="top">Clock enable</td>  </tr>  <tr>     <td valign="top"><b>reset</b></td>    <td valign="top" align="center">Input</td>    <td valign="top">Reset</td>  </tr>  <tr>     <td valign="top"><b>result[20..0]</b></td>    <td valign="top" align="center">Output</td>    <td valign="top">Output of the IIR filter. This is 21 bits wide in the 17.4       signed binary fractional (SBF) format.</td>  </tr></table><br><HR noshade><p>For more information on using this example, go to:</p><ul><li><a href="verilog.html">How to Use Verilog HDL Examples</a><li><a href="/literature/an/an215.pdf"><i>AN 215: Implementing High Performance DSP Functions in Stratix Devices</i></a></ul><HR noshade><h2>Feedback</h2><p>Did this information help you?</p><p>If no, please log onto <a href="https://mysupport.altera.com/eservice/">mySupport</a> to file a technical request or enhancement.</p><p><hr noshade><p></p><font size="-1">Altera does not warrant that this solution will work for the customer's intended purpose and disclaims all liability for use of or reliance on the solution.</font><!-- end content --><!--stopindex-->		<p>&nbsp;</p>    </td>	<td rowspan="3" width="15"><img src="/common/template/spacer.gif" width="15" height="15" alt="" border="0"></td>	</tr>  <tr valign="top">     <td bgcolor="#e0e0e0" valign="top" width="161"> 	&nbsp;	</td></tr><tr> 	<td bgcolor=#e0e0e0 valign="bottom" width="161" height="2">       <p class="footer">	  <br>&nbsp;&nbsp;Contact Us<br>		&nbsp;&nbsp;<a href="/corporate/contact/info/con-feedback_form.jsp">Please Give Us Feedback</a><br>		&nbsp;&nbsp;<a href="/corporate/contact/signup/con-signup.jsp">Sign Up for E-mail Updates</a></p>	</td></tr><!-- Footer Information --> <tr><td bgcolor="#0182C4" colspan="4" align="right"><img src="/common/template/footer_user.gif" width="761" height="18" usemap="#footer_user" border="0" alt="footer"><map name="footer_user"><area shape="rect" coords="521,3,578,16" href="/common/new_user.html" alt="New User to the Altera Web Site" title="New User to the Altera Web Site"><area shape="rect" coords="587,4,631,15" href="/common/sitemap.html" alt="Altera Site Map" title="Altera Site Map"><area shape="rect" coords="643,3,684,14" href="/common/privacy.html" alt="Altera Privacy Policy" title="Altera Privacy Policy"><area shape="rect" coords="690,3,757,14" href="/common/legal.html" alt="Altera Legal Notice" title="Altera Legal Notice"></map></td> </tr><tr>	<td width="161">&nbsp;</td>	<td colspan="3" width="100%"class="footer"><br><!-- begin top level navigation (bottom) --><a href=/index.jsp>Home</a>&nbsp;|&nbsp;<a href=/products/prd-index.html>Products</a>&nbsp;|&nbsp;<a href=/support/spt-index.html>Support</a>&nbsp;|&nbsp;<a href=/solutions/sln-index.html>System Solutions</a>&nbsp;|&nbsp;<a href=/education/edu-index.html>Education & Events</a>&nbsp;|&nbsp;<a href=http://buy.altera.com/ecommerce/>Buy On-Line</a>&nbsp;|&nbsp;<a href=/corporate/crp-index.html>Corporate</a><br><!-- end top level navigation (bottom) --> <!-- begin second level navigation (bottom) --><a href=/mysupport >mySupport</a>&nbsp;|&nbsp;<a href=/support/kdb/spt-search_kdb.html>Knowledge Database</a>&nbsp;|&nbsp;<a href=/support/software/sof-index.html>Software</a>&nbsp;|&nbsp;<a href=/support/devices/dvs-index.html>Devices</a>&nbsp;|&nbsp;<a href=/support/examples/exm-index.html>Design Examples</a><br><!-- end second level navigation (bottom) -->		<p class="footer">Copyright &copy; 1995 - 2002 Altera Corporation, 101 Innovation Drive, San Jose, California 95134, USA.</p>		</td>	</tr>	</table>	</td></tr></table><!--startindex--></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?