05-25-2016 12:42 PM
I am implementing a FIR on a FPGA for the first time. I have a linear imaging sensor outputing 2500 pixels per line and I would like to apply an FIR filter on those.
The interleaved channels seems to be the best option but is unfortunately limited to 1024 channels (2500 needed). I feel like I am missing something and that I should be able to implement this with only one block. Or should I use 3 FIR Compiler blocks? Or write my own FIR block?
06-07-2016 01:33 PM - edited 06-07-2016 01:33 PM
Can you give more details about what you're trying to accomplish? What's the purpose of putting a separate filter on every pixel of one line? What kind of filter are you trying to implement?
11-09-2016 09:06 AM
Sorry for the very late answer, I did not get a notification that you answered.
I am trying to filter the output of my linear optical sensor temporally. That is why I am trying to implement a large FIR filter. Does that make sense or would you recommend a different way of doing so?
11-09-2016 11:24 AM - edited 11-09-2016 11:25 AM
I'm not terribly familiar with linear sensors, so forgive me if any of my questions/suggestions are obvious in this context. I may be missing something :).
Based on my assumptions, what I'm thinking you'll want to build is similar to a filter in the vertical spatial dimension of a 2D filter that's implemented with the structure described here: https://www.xilinx.com/support/documentation/application_notes/xapp933.pdf
You'll buffer the number of lines according to the number of taps and when each new pixel comes in, you'll push it into the linebuffer then pop a value from each linebuffer, do your coef mults, and sum them.
If this is functionally waht you're trying to do, this will save you massive amount of resources compared to 2500 separate FIRs. It'll be just a couple block RAMs (depending on image size) plus the resources to implement one FIR (a small handful of mults and luts, most likely).
11-10-2016 12:04 PM
Thank you for your answer!
When I say "line", I mean one data set from a sampling time point (a data set has 2500 points)
The data is coming one line at a time. The sampling of one line is done with the succession of each pixel.
Yes, each line represent a different sampling point in time.
Our current FIR filter on Matlab is 21 taps with all the same coefficients.
The XAPP933 you sent looks great. I will investigate it and post my updates here.
11-10-2016 12:54 PM
Oh okay, thanks for the info.
Yeah, I think this approach should work, then. You'll use a handful of BRAMs. By my calculations:
Just keep that in mind when selecting a part. If you can trim the number of taps in that filter, you'll save a BRAM for each tap (or 3 per tap for color data).