Jump to content
  • 0

FIR compiler Amplitude


Ahmed Alfadhel

Question

Hi, 

I used FIR filter for my system, and I imported the coefficients form Matlab using FDA tool. 

In matlab (FDA tool), I set the stop band to - 80 dB and the pass band to 0 dB, as indicated in the first attached picture.

But when I opened the coefficients file in Vivado by FIR IP block and checking the frequency response of the filter, the situation was different, as shown in the second attached picture. In fact, the stop band is 50 dB ! and pass band is 125 dB ! I think these are wrong values. How to modify these values in order to be the same as of FDA matlab tool ?

Thanks.

56k FDA.PNG

ampiltude Vivado.JPG

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Well, I'm not familiar with this particular tool. But at a quick glance, I think you need to set "Quantization" to e.g. "quantize only". Then the field "Coefficient fractional bits" becomes enabled.

If it doesn't fall into place easily, start with a simple example, e.g. import a 0 0 256 0 0 FIR with 8 fractional bits and you should see 0 dB across the frequency response.

 

Hint: for an order-of-magnitude cross-check you can get the DC gain of a FIR filter by summing its coefficients. In your example, this should be around 0.0001 for ~ -80 dB @ 0 Hz

And PS: one possible explanation (this is a long shot) is that you designed for 12 bit coefficients and exported in 32 bits => +20

Link to comment
Share on other sites

I must admit I didn't read the manual of that tool... but "Coefficient fractional Bits" should do the required scaling (my guess: "20" for the correct value, given your 120 dB peak gain)

I'd try to re-run the wizard with new, default settings to get rid of the error.

Have you checked your input file, are there very large numbers (such as 32-bit-ish, like 2e9)? It may be that the tool uses 32 bits internally and needs some headroom (guessing,..), try to export to a lower range. For example, sign bit + 1 integer bit + 16 fractional bits (18 total) would seem reasonable.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...