ver_tdm_fir.html
来自「verilog的入门级别的例子(转载)」· HTML 代码 · 共 337 行 · 第 1/2 页
HTML
337 行
<P>A time domain multiplexed finite impulse response (FIR) filter is clocked n times as fast as the sample rate in order to reuse the same hardware. Since the same circuitry is being reused, this technique saves logic resources.</P><p>Figure 1 shows an 8-tap time domain multiplexed FIR filter with a time domain multiplex factor of two. Since the factor is two, only four multipliers are required to implement the 8-tap filter. In the first cycle of the 2x clock, the result of multiplying the input with the first four coefficients is computed; in the second cycle, the result of multiplying the input with the remaining four coefficients is computed. At the end of two cycles of 2x clock, these results are added to generate the overall output. The delay introduced by the register at the output ensures that the two results are aligned properly.</p><p><b><i>Figure 1. Block Diagram of Filter with Time Domain Multiplex Factor of n=2</i></b></p><img src="images/ver-tdm_fir_fig1.gif" alt="Figure 1. Block Diagram of Filter with Time Domain Multiplex Factor of n=2" width="426" height="140" border="0"><p>This design example describes the design of an 8-tap time domain multiplexed FIR filter with 18-bit coefficient and input resolution. Both the data and the coefficients are loaded in parallel. See <i><a href="/literature/an/an215.pdf">AN 215: Implementing High Performance DSP Functions in Stratix Devices</a></i> for details.</p><p>Download the files used in this example:</p><ul><li><a href="/patches/examples/verilog/tdm_fir.zip">Download tdm_fir.zip</a><li><a href="../download/tdm_fir_vlog_readme-v1.0.0p1.txt">Download Time Domain Multiplexed FIR Filter Design Example README File</a></ul><p>Files in the download include:</p><ul><li>tdm_fir.v - Top-level design file<li>clk_pll.v - PLL to generate 1x and 2x clock<li>sr_shift_taps.v - Shift register implemented using altshift_taps Megafunction<li>mult_add.v - Multiply-add function implementation using altmult_add Megafunction<li>ext_adder.v - Adder to sum all eight multiply-add operations<li>rom0.v, rom1.v, rom2.v, rom3.v - ROM used to store coefficients<li>tdm_fir.m - MATLAB script to verify functionality of design</ul><p>Figure 2 illustrates the tdm_fir top-level block diagram.</p><p><b><i>Figure 2. tdm_fir Top-Level Block Diagram</i></b></p><img src="images/ver-tdm_fir_fig2.gif" alt="Figure 2. tdm_fir Top-Level Block Diagram" width="524" height="139" border="0"><p>Table 1 shows the Time Domain Multiplex FIR filter design example port listing.</p><table width="100%" border="1" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><b><i>Table 1. Time Domain Multiplexed FIR Filter Design Example Port Listing 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>x0[17..0]</b></td> <td valign="top" align="center">Input</td> <td valign="top">Signed 18-bit input data shifted in serially using the shift register within the DSP block</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>load_data</b></td> <td valign="top" align="center">Output</td> <td valign="top">When asserted, the filter is ready to accept data on the x0 port</td> </tr> <tr> <td valign="top"><b>tdm_result[38..0]</b></td> <td valign="top" align="center">Output</td> <td valign="top">Output of the Time Domain Multiplexed FIR filter</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> </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"> </td></tr><tr> <td bgcolor=#e0e0e0 valign="bottom" width="161" height="2"> <p class="footer"> <br> Contact Us<br> <a href="/corporate/contact/info/con-feedback_form.jsp">Please Give Us Feedback</a><br> <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"> </td> <td colspan="3" width="100%"class="footer"><br><!-- begin top level navigation (bottom) --><a href=/index.jsp>Home</a> | <a href=/products/prd-index.html>Products</a> | <a href=/support/spt-index.html>Support</a> | <a href=/solutions/sln-index.html>System Solutions</a> | <a href=/education/edu-index.html>Education & Events</a> | <a href=http://buy.altera.com/ecommerce/>Buy On-Line</a> | <a href=/corporate/crp-index.html>Corporate</a><br><!-- end top level navigation (bottom) --> <!-- begin second level navigation (bottom) --><a href=/mysupport >mySupport</a> | <a href=/support/kdb/spt-search_kdb.html>Knowledge Database</a> | <a href=/support/software/sof-index.html>Software</a> | <a href=/support/devices/dvs-index.html>Devices</a> | <a href=/support/examples/exm-index.html>Design Examples</a><br><!-- end second level navigation (bottom) --> <p class="footer">Copyright © 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 + -
显示快捷键?