Array size of an argument passed to the graph’s update() method depends on the FIR variant type, as well as the operational mode the FIR is configured to run.
In case the FIR is configured in a non-SSR mode, i.e.,
TP_SSR
is set to 1, the reloadable coefficient array size is similar to the static coefficient variant.Asymmetrical* FIR
Asymmetrical filters expect the port to contain the full array of coefficients, i.e., the coefficient array size is equal to the
TP_FIR_LEN
.Symmetrical FIR
In the case of symmetrical (non-half-band) filters, only the first half (plus any odd center tap) need be passed, as the remaining can be derived by symmetry.
The length of the array expected will therefore be
(TP_FIR_LEN+1)/2
,e.g., for a filter of length 7, where
int16
type coefficient’s values are:{1, 2, 3, 5, 3, 2, 1}
,four non-zero tap values, including the center tap, are expected, i.e., the constructor expects an argument:
int16 tapsIn[4] = {1, 2, 3, 5}
.Half-band FIR
For half-band filters, only the non-zero coefficients should be entered, with the center tap last in the array.
The length of the array expected will therefore be
(TP_FIR_LEN+1)/4+1
,e.g., for a half-band filter of length 7, where
int16
type coefficient’s values are:{1, 0, 2, 5, 2, 0, 1}
,three non-zero tap values, including the center tap, are expected, i.e., the constructor expects an argument:
int16 tapsIn[3] = {1, 2, 5}
.