DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 12/04/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.1.2.3. FIR Filter Coefficient Sharing

FIR coefficient sharing is an optimization that can reduce resources in some FIR configurations depending on your FIR specification.

The FIR coefficient sharing can be off, on, or auto.

Table 36.  Coefficient Sharing Options
Option Description
Auto

The default is Auto. Intel recommends you select Auto.

DSP Builder interprets Auto as on or off when it builds your FIR filter. You automatically see the benefits of coefficient sharing if you select Auto.

DSP Builder interprets Auto as on and applies coefficient sharing automatically. The FIR interface is unaffected when bank count is 1.

DSP Builder interprets Auto as off when bank count >1 (because its application affects the FIR interface).

You should observe the diagnostic information report when you run and generate the design. With Auto, DSP Builder applies coefficient sharing whenever possible. However, if your FIR filter has multiple banks and your configuration allows coefficient sharing, DSP Builder does not apply it, as it affects the FIR interface. DSP Builder generates an information report suggesting how you can turn coefficient sharing on. Refer to Banks

On

If you set coefficient sharing to On and your FIR configuration is incompatible with coefficient sharing, DSP Builder gives an error and suggests that you change the setting.

Do not select On if the FIR filter does not have multiple identical channels.

You see a single bank-select for all inputs if bank count>1. The FIR filter external interface is different.

DSP Builder does not see a FIR filter with only a single input wire as an error. Effectively DSP Builder considers one input wire to be a degenerate case of sharing.

Off Legacy (unoptimized) FIR behavior.

If you select Off, DSP Builder never applies coefficient sharing.

For bank count>1, DSP Builder maintains the original FIR filter interface. Each input wire has its own distinct bank-select input.

The diagnostic information report identifies specifically when DSP Builder can apply coefficient sharing to your FIR filter configuration. Generally, it applies when:

  • Multiple identical IPs run in parallel, which allows DSP Builder to share a single set of coefficients between them (instead of a separate copy for each IP). A FIR filter comprises one or many IPs. A FIR filter has multiple identical IPs if:
    • Its sample rate is an integer multiple of the clock rate
    • Its interpolation or decimation factors maintain this distinction on the output rate
    • It has more than one channel.
  • The sample-rate is 1/n the clock rate and there are 2n or a higher integer multiple of channels (each IP processes n channels).

    Each channel's input and output is on one or more independent wires (identical). A separate IP processes each channel so they can do coefficient sharing, because each IP requires the same coefficientss at the same time.

Examples where coefficient sharing may apply:

  • Two or more channels where the sample rate is the clock rate (or an integer multiple).
  • Four channels (or any larger even number) where the sample rate is half the clock rate.

Resource Effects

Applying coefficient sharing can give large resource reductions by reducing N copies of the coefficient to one and reducing surrounding logic.

Coefficient sharing tends to be fMAX neutral, but if you see negative effects, you can turn it off if you need to.

In some simpler FIR filter configurations, you may see coefficient sharing has no noticeable effect. In particular, in a FIR filter with constant coeffficients and only one or few banks, DSP Builder may absorb these coefficients into the DSP block's coefficient storage memory (depending on your target device), so coefficient sharing has no resource impact.

Banks

When the FIR filter configuration has multiple banks, before you turn on coefficient sharing, DSP Builder creates a pair of each input wire in-parallel with its own bank select input.

When you turn on coefficient sharing for such a configuration, DSP Builder applies a single bank select for all wires in parallel as a consequence of sharing.

With multiple banks, DSP Builder does not apply coefficient sharing if you select Auto and you must explicitly select On because the FIR filter interface changes after coefficient sharing. If you do select Auto, the DSP Builder report informs you that the design is open to coefficient sharing and that you may turn it On.

Where the FIR configuration has a single bank and no bank select, coefficient sharing does not change the interface (you may select Auto).