Altera Home Page
Literature Licensing
Buy On-Line Download

  Home   |   Products   |   Support   |   End Markets   |   Technology Center   |   Education & Events   |   Corporate   |   Buy On-Line  
  Knowledge Database   |   Devices   |   Design Software   |   Intellectual Property   |   Design Examples   |   mySupport   |   Reference Designs  

 Products
      MAX/MAX II
      Stratix/Stratix GX
      Nios II
  
 Functionality
      Arithmetic
      Memory
      Bus & I/O
      Logic
      Interfaces & Peripherals
      DSP
      Communications
      PLL & Clocking
  
 Design Entry
      Quartus II Project
      Tcl
      VHDL
      Verilog HDL
      C Code Examples
      DSP Builder
      TimeQuest
   On-Chip Debugging
  
 Simulation Tools
      Mentor Graphics ModelSim
      Cadence NCsim
      Synopsys VCS
  
 Legacy Examples
      Graphic Editor
      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:

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:


Feedback

Did this information help you?

If not, please log onto mySupport to file a technical request or enhancement.


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.

  Please Give Us Feedback