cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
7,534 Views
Registered: ‎02-24-2016

FIR Compiler - 2500 parallel channels

Hi,

 

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?

 

Thanks!

 

Paul

0 Kudos
5 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,045 Views
Registered: ‎08-02-2011

Hi Paul,

 

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?

www.xilinx.com
0 Kudos
Highlighted
Contributor
Contributor
3,932 Views
Registered: ‎02-24-2016

Hi,

 

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?

 

Thanks!

 

Paul

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
3,924 Views
Registered: ‎08-02-2011

Hi Paul,

 

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 :).

 

Some questions:

  • Presumably the data is coming into the FPGA one pixel at a time, right?
  • Does each line from a linear filter represent a different sampling point in time? So you're effectively filtering the same pixel from one line to the next?
  • How many taps is your filter?
  • Same coefficients for each one?

 

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).

www.xilinx.com
0 Kudos
Highlighted
Contributor
Contributor
3,906 Views
Registered: ‎02-24-2016

Hi bwiec,

 

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.

 

Thanks again!

 

Paul

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
3,901 Views
Registered: ‎08-02-2011

Hi Paul,

 

Oh okay, thanks for the info.

 

Yeah, I think this approach should work, then. You'll use a handful of BRAMs. By my calculations:

  • You'll need to store 20 lines for a 21 tap filter
  • 20*2500 = 50000 total samples need to be stored
  • 7-series BRAM configured for 4K x 9, for example, could cover one line (assuming 8 bit depth)
  • so that'll be 20 BRAMs (or 60 if you're doing color RGB)

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).

www.xilinx.com
0 Kudos