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

多个系数集

对于多系数过滤器,单个.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.

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

李锐博恩

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值