【 FPGA 】FIR滤波器之 多个系数集问题以及 使用非整数实数的系数规范问题

版权声明:本博客内容来自于个人学习过程中的总结,参考了互联网以及书本、论文等上的内容,仅供学习交流使用,如有侵权,请联系我会重写!转载请注明地址! https://blog.csdn.net/Reborn_Lee/article/details/82917068

多个系数集

对于多系数过滤器,单个.coe文件用于指定系数集。 每个系数集应附加到前一组系数。

例如,如果设计了一个2系数集,10抽头对称滤波器,

系数集#0为:coefdata = -1,-2,-3,4,5,5,4,-3,-2 ,-1;

和系数集#1是:

coefdata = -9,-10,-11,12,13,13,12,-11,-10,-9;

那么整个过滤器的.coe文件就是

radix = 10;
coefdata = -1,-2,-3,4,5,5,4,-3,-2,-1,-9,-10,-11,12,13,13,12,-11,-10 ,-9;

多组实现中的所有系数集必须表现出相同的对称性。 例如,如果甚至一组多组具有非对称系数结构,则使用该结构实现所有组。 所有系数集也必须具有相同的向量长度。 如果一个系数集具有较少的系数,则它必须为零填充 - 在非对称或前置时附加零,并在对称时附加相等数量的零。 有关详细信息,请参阅“系数填充”部分。


使用非整数实数的系数规范

如前所述,您可以将系数值指定为非整数实数,并将基数设置为10.例如:

基数= 10;
coefdata = 0.08659436542927,0.00579513928555,-0.06734424313287,-0.04031582111240;

然后,IP核对系数进行量化,以根据指定的系数位宽生成滤波器中使用的二进制系数值。 这允许您提供从所选滤波器设计工具派生的浮点值,并通过改变系数位宽并观察量化频率响应与理想响应相比的变化来探索性能和资源使用之间的成本和收益。 通过将量化字段设置为Quantize_Only来选择基本量化函数。 有关详细信息,请参阅系数量化。

可以通过检查在项目目录中生成的主核心MIF文件(<component_name> .mif)来确定过滤器实现中使用的整数值。 MIF文件始终采用二进制格式。


下面给出上述内容的英文原版

Multiple Coefficient Sets

For multiple coefficient filters, a single .coe file is used to specify the coefficient sets. Each coefficient set should be appended to the previous set of coefficients.

For example, if a 2-coefficient set, 10-tap symmetric filter was being designed and coefficient set #0 was:  coef data = -1, -2, -3, 4, 5, 5, 4, -3, -2, -1;

and coefficient set #1 was:

coefdata = -9, -10, -11, 12, 13, 13, 12, -11, -10, -9;

then the .coe file for the entire filter would be

radix = 10;
coefdata = -1, -2, -3, 4, 5, 5, 4, -3, -2, -1, -9, -10, -11, 12, 13, 13, 12, -11, -10, -9;

All coefficients sets in a multiple set implementation must exhibit the same symmetry. For example, if even one set of a multi-set has non-symmetric coefficient structure, then all sets are implemented using that structure. All coefficient sets must also be of the same vector length. If one coefficient set has fewer coefficients, it must be zero padded – either appended with zeros when non-symmetric or prepended and appended with an equal number of zeros when symmetric. See the Coefficient Padding section for further information.

Coefficient Specification Using Non-integer Real Numbers

As indicated previously, you can specify the coefficient values as non-integer real numbers, with the radix set to 10. For example:

radix = 10;
coefdata = 0.08659436542927, 0.00579513928555, -0.06734424313287, -0.04031582111240;

The coefficients are then quantized by the core to produce the binary coefficient values used in the filter, based on your specified coefficient bit width. This allows you to supply floating-point values derived from a chosen filter design tool and explore the costs and benefits between performance and resource usage by altering the coefficient bit width and observing the alteration in the quantified frequency response in comparison to the ideal response. The basic quantization function is selected by setting the Quantization field to Quantize_Only. See Coefficient Quantization for further details.

The integer values used in the filter implementation can be determined by examining the main core MIF file (<component_name>.mif) which is generated in the project directory. The MIF file is always in binary format.

猜你喜欢

转载自blog.csdn.net/Reborn_Lee/article/details/82917068