Template Parameters - 2023.1 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.1 English

The following table lists parameters for all the FIR filters.

Note

Note that some parameters are not present on certain variants of FIR where the parameter is not applicable to that variant, e.g.: TP_INTERPOLATE_FACTOR is not present on single-rate FIRs.

Note

TP_RND values may vary between AIE and AIE-ML for the same rounding mechanism. String macro defitions are recommended for convienience and compatibility between devices. For AIE-ML see Parameters Supported by FIR Filters.

Table 49 Parameters Supported by FIR Filters
Parameter Name Type Description Range
TT_DATA Typename Data Type int16, cint16, int32, cint32, float, cfloat
TT_COEFF Typename Coefficient type int16, cint16, int32, cint32, float, cfloat
TP_FIR_LEN Unsigned int The number of taps

Min - 4,

Max - see Maximum FIR Length

TP_INTERPOLATE_FACTOR Unsigned int Ratio of output samples to input samples 1 (default) to 7 (interpolating variants only)
TP_DECIMATE_FACTOR Unsigned int Ratio of input samples to output samples 1 (default) to 7 (decimating variants only)
TP_SHIFT Unsigned int The number of bits to shift unscaled result down by before output. 0 to 61
TP_RND Unsigned int Round mode

0 = rnd_floor truncate or floor

1 = rnd_ceil ceiling

2 = rnd_pos_inf positive infinity

3 = rnd_neg_inf negative infinity

4 = rnd_sym_inf symmetrical to infinity

5 = rnd_sym_zero symmetrical to zero

6 = rnd_conv_even convergent to even

7 = rnd_conv_odd convergent to odd

TP_INPUT_WINDOW_VSIZE Unsigned int The number of samples processed by the graph in a single iteration run. For windows, defines the size of input window. For streams, it impacts the number of input samples operated on in a single iteration of the kernel.

Must be a multiple of the 256-bits In addition, must by divisible by: TP_SSR and TP_DECIMATE_FACTOR.

No enforced range, but large windows will result in mapper errors due to excessive RAM use, for windowed API implementations.

TP_CASC_LEN Unsigned int The number of cascaded kernels to use for this FIR.

1 to 9.

Defaults to 1 if not set.

TP_DUAL_IP Unsigned int

Use dual inputs ports.

An additional ‘in2’ input port will appear on the graph when set to 1.

Range 0 (single input), 1 (dual input).

Defaults to 0 if not set.

TP_USE_COEFF_RELOAD Unsigned int

Enable reloadable coefficient feature.

An additional ‘coeff’ port will appear on the graph.

0 (no reload), 1 (use reloads).

Defaults to 0 if not set.

TP_NUM_OUTPUTS Unsigned int

Number of FIR output ports

An additional ‘out2’ output port will appear on the graph when set to 2.

1 to 2

Defaults to 1 if not set.

TP_UPSHIFT_CT Unsigned int Center tap coeff form
0 = center tap operates like
all other coefficients
1 = center tap coeff is a
power of 2 shift. (interpolate half-band only)
TP_API Unsigned int I/O interface port type

0 = Window

1 = Stream

TP_SSR Unsigned int Parallelism factor

min=1

Defaults to 1 if not set.

Max = limited by resource availability

TP_PARA_INTERP_POLY Unsigned int Number of interpolation polyphases that produce output data in parallel

min = 1 max = TP_INTERPOLATE_FACTOR

must be a factor of interpolate factor

TP_PARA_DECI_POLY Unsigned int Number of decimation polyphases into which data is split into for parallel computation

min = 1 max = TP_DECIMATE_FACTOR

must be a factor of decimation factor

For a list of template parameters for each FIR variant, see API Reference Overview.

TP_CASC_LEN describes the number of AIE processors to split the operation over, which allows resources to be traded for higher performance. TP_CASC_LEN must be in the range 1 (default) to 9. FIR graph instance creates TP_CASC_LEN kernels. Computation workload of the FIR (defined by its length parameter TP_FIR_LEN) is divided and each kernel in the graph is then assigned a fraction of the workload, i.e. each kernel performs TP_FIR_LEN / TP_CASC_LEN. Kernels are connected with cascade ports, which pass partial accumulation products downstream until last kernel in chain produces the output.

TP_DUAL_IP is an implementation trade-off between performance and resource utilization. Symmetric FIRs may be instanced with 2 input ports to alleviate the potential for memory read contention, which would otherwise result in stall cycles and therefore lower throughput. In addition, FIRs with streaming interface may utilize the second input port to maximize the available throughput.

  • When set to 0, the FIR is created with a single input port.

  • When set to 1, two input ports will be created.

    Note

    When used, port port<input> in2; will be added to the FIR.

TP_USE_COEFF_RELOAD allows the user to select if runtime coefficient reloading should be used. When defining the parameter:

  • 0 = static coefficients, defined in filter constructor

  • 1 = reloadable coefficients, passed as argument to runtime function.

    Note

    When used, port port<input> coeff; will be added to the FIR.

TP_NUM_OUTPUTS sets the number of output ports to send the output data to. Supported range: 1 to 2.

For Windows API, additional output provides flexibility in connecting FIR output with multiple destinations. Additional output out2 is an exact copy of the data of the output port out.

Stream API uses the additional output port to increase the FIR’s throughput. Please refer to Stream Output for more details.

Note

When used, port port<output> out2; will be added to the FIR.

TP_SSR sets a parallelism factor. SSR stands for Super Sample Rate. This setting allows for higher throughput at the expense of more tiles or kernels.

For more details about the internals of the graph with SSR operation, refer to Super Sample Rate.

TP_PARA_INTERP_POLY sets the number of interpolator polyphases which are executed in parallel with output data produced by each polyphase output directly its own output port (or ports when TP_SSR>1).
TP_PARA_INTERP_POLY does not affect the number of input data ports.
TP_PARA_INTERP_POLY can be used in combination with TP_SSR.
The number of AIEs used is given by TP_PARA_INTERP_POLY * TP_SSR^2 * TP_CASC_LEN.

For more details about the internals of the graph with SSR operation, refer to Super Sample Rate.

TP_PARA_DECI_POLY specifies the number of distinct input data polyphases over which the input stream will be split.
The polyphase computations are performed in a series and the outputs are combined into a single output stream.
TP_PARA_DECI_POLY does not affect the number of output data ports.
The number of AIEs used is given by TP_PARA_DECI_POLY * TP_SSR^2 * TP_CASC_LEN.

For more details about how to configure the various parameters to meet various performance metrics, see Super Sample Rate - Operation Modes