Altera Home Page
文档资料 许可
在线购买 下载

  主页   |   产品   |   支持   |   最终市场   |   技术中心   |   教育与活动   |   公司介绍   |   在线购买  
  mySupport   |   器件   |   软件   |   IP   |   设计范例   |   参考设计  

 产品
      MAX/MAX II
      Stratix/Stratix GX
      Nios II
  
 功能
      算法
      存储器
      总线及I/O
      逻辑
      接口与外设
      DSP
      通信
      PLL & Clocking
  
 设计输入方法
      Quartus II软件工程
      Tcl
      VHDL
      Verilog HDL
      C Code 范例
      DSP Builder
      TimeQuest
   片内调试
  
 仿真工具
      Mentor Graphics ModelSim
      Cadence NCsim
      Synopsys VCS
  
 旧范例
      图形编辑器
      AHDL
  

Verilog HDL: Time Domain Multiplexed FIR Filter

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.

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.

Figure 1. Block Diagram of Filter with Time Domain Multiplex Factor of n=2

Figure 1. Block Diagram of Filter with Time Domain Multiplex Factor of n=2

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. For more details, see the Implementing High-Performance DSP Functions in Stratix & Stratix GX Devices chapter of the Stratix Device Handbook.

Download the files used in this example:

The use of this design is governed by, and subject to, the terms and conditions of the Altera Hardware Reference Design License Agreement.

Files in the download include:

  • tdm_fir.v - Top-level design file
  • clk_pll.v - PLL to generate 1x and 2x clock
  • sr_shift_taps.v - Shift register implemented using altshift_taps Megafunction
  • mult_add.v - Multiply-add function implementation using altmult_add Megafunction
  • ext_adder.v - Adder to sum all eight multiply-add operations
  • rom0.v, rom1.v, rom2.v, rom3.v - ROM used to store coefficients
  • tdm_fir.m - MATLAB script to verify functionality of design

Figure 2 illustrates the tdm_fir top-level block diagram.

Figure 2. tdm_fir Top-Level Block Diagram

Figure 2. tdm_fir Top-Level Block Diagram

Table 1 shows the Time Domain Multiplex FIR filter design example port listing.

Table 1. Time Domain Multiplexed FIR Filter Design Example Port Listing Listing
Port Name Type Description
x0[17..0] Input Signed 18-bit input data shifted in serially using the shift register within the DSP block
clk Input Clock
clken Input Clock enable
reset Input Reset
load_data Output When asserted, the filter is ready to accept data on the x0 port
tdm_result[38..0] Output Output of the Time Domain Multiplexed FIR filter

For more information on using this example, go to:

Design Examples Disclaimer

These design examples may only be used within Altera Corporation devices and remain the property of Altera. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.

  请填写反馈意见