Video and Image Processing Suite User Guide

ID 683416
Date 2/12/2021
Public

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

Document Table of Contents

8.3. 2D FIR Coefficient Specification

You can either specify the filtering operation coefficients as fixed values that are not run-time editable, or you can opt to enable an Avalon-MM slave interface to edit the values of the coefficients at run time.

The 2D FIR Filter IP core requires a fixed point type to be defined for the coefficients. The user-entered coefficients (shown as white boxes in the parameter editor) are rounded to fit in the chosen coefficient fixed point type (shown as purple boxes in the parameter editor).

  • In run-time editable coefficient mode, you must enter the desired coefficient values through an Avalon-MM control slave interface at run time, and the coefficient values may be updated as often as once per frame.
    Note: In this mode, the coefficient values will all revert to 0 after every reset, so coefficients must be initialized at least once on start-up.
  • To keep the register map as small as possible and to reduce complexity in the hardware, the number of coefficients that are edited at run time is reduced when any of the symmetric modes is enabled.
  • If there are T unique coefficient values after symmetry is considered then the register map will contain T addresses into which coefficients should be written, starting at address 7 and finishing at T+ 6.
  • Coefficient index 0 (as described in the symmetry section) should be written to address 7 with each successively indexed coefficient written at each following address. The updated coefficient set does not take effect until you issue a write to address 6 - any value may be written to address 6, it is just the action of the write that forces the commit.
  • The new coefficient set will then take effect on the next frame after the write to address 6 Note that the coefficient values written to the register map must be in pre-quantized form as the hardware cost to implement quantization on floating point values would be prohibitive.
Table 30.  2D FIR Filter II Coefficient Modes
Coefficient Mode Description
Fixed Coefficient
  • In fixed coefficient mode, the values for the coefficients are specified using a comma separated CSV text file and there is no Avalon-MM control slave interface and the selected coefficient values take effect immediate effect at reset.
  • Regardless of the symmetry mode, the text file must contain a full listing of all the coefficients in the N×M array i.e. the file must always contain N×M comma separated values.
  • When the CSV file is parsed in Platform Designer to create the list of compile time coefficients, the values entered will be checked against the selected symmetry mode and warnings issued if the coefficients are not found to be symmetric across the selected axes.
  • The values specified in the CSV file must be in their unquantized format – for example, if you want a value of 1.7 for a given coefficient, then the value in the file should be 1.75.
  • When the file is parsed in Platform Designer, the coefficients will be automatically quantized according to the precision you specified.
    Note: The quantization process aims to select the closest value available in the given precision format. If you select the coefficients are selected arbitrarily without reference to the available precision, then the quantized value may differ from the desired value.
Run-time Editable Coefficient
  • In run-time editable coefficient mode, you must enter the desired coefficient values through an Avalon-MM control slave interface at run time, and the coefficient values may be updated as often as once per frame.
    Note: In this mode, the coefficient values will all revert to 0 after every reset, so coefficients must be initialized at least once on start-up.
  • To keep the register map as small as possible and to reduce complexity in the hardware, the number of coefficients that are edited at run time is reduced when any of the symmetric modes is enabled.
  • If there are T unique coefficient values after symmetry is considered then the register map will contain T addresses into which coefficients should be written, starting at address 7 and finishing at T+ 6.
  • Coefficient index 0 (as described in the symmetry section) should be written to address 7 with each successively indexed coefficient written at each following address. The updated coefficient set does not take effect until you issue a write to address 6 - any value may be written to address 6, it is just the action of the write that forces the commit.
  • The new coefficient set will then take effect on the next frame after the write to address 6.
    Note: The coefficient values written to the register map must be in pre-quantized format as the hardware cost to implement quantization on floating point values is prohibitive.