cancel
Showing results for
Show  only  | Search instead for
Did you mean:
Newbie
497 Views
Registered: ‎05-29-2020

## design of FIR filter

i am designing FIR Low pass filter of cutoff frequency 120 Hz,with 100 taps and data width is 32bit.i am can i use '*' operator for multiplications as per FIR Structure or i have to design  special multiplier block for multiplication.

i had used '*' operator for multiplication,in behavioral simulation i got very good results, is it okay to synthesize the design and implement it ?.

1 Solution

Accepted Solutions
Scholar
436 Views
Registered: ‎05-21-2015

You haven't mentioned  the sample rate you want to operate at.  The sample rate will determine the algorithm you implement.  For example, if your sample rate is the system clock rate (50MHz or higher in general, but not specifically) then you might want to use an algorithm like this one.  It will use one DSP multiply per coefficient.  If the filter is symmetric (most FIR's are), you can drop that in half by applying the symmetry first.  If on the other hand your sample rate is much slower than the system clock rate, then you can reuse multiplies and so get by with perhaps only using one multiply per clock cycle.  You can also play the symmetric trick and use half as many multiplies, as discussed here.

Those would describe straightforward implementations.

Most FIR implementations for really low bandwidth but operating on high sample rate signals use multirate approaches, such as Fred Harris discusses in his text on the topic.  You'd then process the signal in stages.  The first stage would downsample the signal using some form of CIC filter.  No multiplies required.  The second stage would then apply something like the slow filter above.  This is required because 1) CIC filters are sloppy, and don't have a very flat passband, and so 2) you have at least one (if not two) more decimations required.

Another solution you might wish to consider uses the multirate techniques above, but then also resamples the signal when done back up to the system clock rate.  This solution is one I've wanted to build often enough, but not (yet) had the chance to play with.  Still, it's basic textbook stuff.

Dan

5 Replies
Scholar
492 Views
Registered: ‎08-07-2014

Yes you can use the * operator. The synthesis tool will infer mult blocks.

------------FPGA enthusiast------------
Asking for solutions to problems via PM will be ignored.

Newbie
490 Views
Registered: ‎05-29-2020

okay,in my design there will be 100 multiplier blocks with two inputs of 32 bit and output of 64 bit.is there any error while synthesis and implementation ?.

Tags (1)
Scholar
472 Views
Registered: ‎06-20-2012

Code with '*' and compile.

The largest FPGAs have thousands multipliers.

Scholar
451 Views
Registered: ‎06-21-2017

Be sure to code in a couple pipeline registers if you want to run at a fairly high clock frequency.  64 bits out probably means two DSP cells per multiply.  You will need a few register delays to make this work.

Scholar
437 Views
Registered: ‎05-21-2015

You haven't mentioned  the sample rate you want to operate at.  The sample rate will determine the algorithm you implement.  For example, if your sample rate is the system clock rate (50MHz or higher in general, but not specifically) then you might want to use an algorithm like this one.  It will use one DSP multiply per coefficient.  If the filter is symmetric (most FIR's are), you can drop that in half by applying the symmetry first.  If on the other hand your sample rate is much slower than the system clock rate, then you can reuse multiplies and so get by with perhaps only using one multiply per clock cycle.  You can also play the symmetric trick and use half as many multiplies, as discussed here.

Those would describe straightforward implementations.

Most FIR implementations for really low bandwidth but operating on high sample rate signals use multirate approaches, such as Fred Harris discusses in his text on the topic.  You'd then process the signal in stages.  The first stage would downsample the signal using some form of CIC filter.  No multiplies required.  The second stage would then apply something like the slow filter above.  This is required because 1) CIC filters are sloppy, and don't have a very flat passband, and so 2) you have at least one (if not two) more decimations required.

Another solution you might wish to consider uses the multirate techniques above, but then also resamples the signal when done back up to the system clock rate.  This solution is one I've wanted to build often enough, but not (yet) had the chance to play with.  Still, it's basic textbook stuff.

Dan