Skip to main content

Timeline for FIR lowpass filter

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Aug 16, 2016 at 22:14 vote accept Dan Booker
Aug 16, 2016 at 22:14 comment added Dan Booker Thanks for all your help. In the end my colleague found a CIC filter integrated in the software we were using but this has certainly helped my understand things better!
Aug 15, 2016 at 19:54 comment added alex.forencich I also just tried playing around with the M value a bit. Looks like setting M to 2 or 3 might be worth trying as well.
Aug 15, 2016 at 16:24 comment added alex.forencich Oh, the gain of the CIC filter is rate^2. So if you use a rate of 2^n, you need a right shift the filter output by n*2 so the overall gain is 1.
Aug 15, 2016 at 15:49 comment added alex.forencich Can you post your test bench so I can check it?
Aug 15, 2016 at 15:18 comment added Dan Booker Output still seems to be identical to input with a delay.
Aug 15, 2016 at 14:53 comment added alex.forencich Actually, if you want a 50 kHz cutoff, you'll need to decimate to around 100 ksps, or a factor of 2500 down from 125 Msps. So try RMAX = rate = 2048 and see what that looks like.
Aug 15, 2016 at 14:44 comment added alex.forencich Actually, it's probably ideal to use a power of 2. Say, 128. The reason is that you have to rescale the output of the CIC filter by the rate, and this is just a bit shift if it's a power of two.
Aug 15, 2016 at 14:42 comment added alex.forencich Try setting RMAX and rate to something large. Say, 100.
Aug 15, 2016 at 14:40 comment added Dan Booker Running the module with default parameters and a 1MHz input on my testbench seems to just return the same wave with phase delay.
Aug 15, 2016 at 14:29 comment added alex.forencich And since the output is decimated, you could follow it up with a long FIR filler that's implemented with a single multiplier and a couple of RAMs.
Aug 15, 2016 at 14:27 comment added alex.forencich RMAX is just the maximum rate that you want to use. It sets the register widths so that you don't get overflow that that rate. Then you connect the rate input to the decimation rate that you want. You can change the rate at run time if you want, or just tie it to a constant value. This is CIC low pass and decimation, so you may want to follow it up with an FIR low pass filter to get a sharper profile, to correct for the CIC filter profile, or both.
Aug 15, 2016 at 13:59 comment added Dan Booker This looks great. Do you have any idea as to what sort of values RMAX and rate should take? And is this just a decimator or does it low pass as well?
Aug 13, 2016 at 0:38 history edited alex.forencich CC BY-SA 3.0
added 99 characters in body
Aug 13, 2016 at 0:33 history answered alex.forencich CC BY-SA 3.0