Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThe worst-case gain depends on whether you want programmable coefficients or not.
For example, if you have 100 8-bit taps, then the worst-case gain is the sum of 100 0xFF values, i.e., a bit-growth of log2(100). If your coefficients are fixed, then the worst-case bit-growth occurs for the worst-case signal made from sign(h[n]), where h[n] are your coefficients. This signal makes the FIR filter output peak sum(abs(h[n])). --- Quote Start --- I want to 0db Gain result, but result is -6db --- Quote End --- FIR filters are generally designed to maximize the dynamic range, and then the "gain" is whatever, and you just deal with it, eg., by scaling the output to the nearest power of 2, or using a multiplier to apply gain, and then re-quantizing the result (via saturation and rounding). Depending on what you are filtering, you do not always know ahead-of-time what the output power in the band will be, so the filter output gain may need to be programmable. Cheers, Dave