Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches

◆ nrf_axon_fir_16_16_32_decimate()

nrf_axon_result_e nrf_axon_fir_16_16_32_decimate ( const int16_t * input_ptr,
const int16_t * filter_ptr,
int32_t * out_ptr,
uint16_t input_length,
uint16_t filter_length,
uint16_t decimate,
uint8_t rounding_bits,
nrf_axon_syncmode_blocking_e block_mode,
bool keep_reservation )

"FIR" => "Finite Impulse Response" filter with decimation multiple. Filter coefficients are MAC'd with the input. Input elements are multiplied with filter elements in the same order. in the order. ie, for filter length F, output x[n] = input[n]*filter[0] + input[n+1]*filter[F+1]+...input[n+F-1]*filter[F-1]. After each output is generated, the input skips ahead by decimate_width. The filter output starts at out_ptr[0].

This implementation uses a 1D strategy that works for odd lengths and/or decimation = 1.

Input is int16, filter is int16, and output is int32.

Parameters
input_ptrpointer to the input, 16bit integer.
filter_ptrpointer to the filter coefficients, 16bit integer.
out_ptrpointer to the output, saturated to int32. 1st valid output starts at offset 0. Output can overlap/overwrite input.
input_lengthlength of the input (in elements). Minimum 4, maximum 512, input_length >= filter_length.
filter_lengthlength of the filter (in elements). Minimum 4, maximum 32, input_length >= filter_length.
decimatedecimation factor. This input_ptr is advanced by this many elements after each output. minimum 1, maximum 16
rounding_bitsnumber of bits to round the output by.
block_moderecommended to be set to NRF_AXON_SYNC_MODE_BLOCKING_POLLING.
keep_reservationset to true if there are subsequent axon operations to execute immediately on completion. true prevents axon from be taken by another user and/or being powered off. Set to false if axon will not be used immediately after to free axon for other users and/or power down if idle.
Returns
kAxonResultSuccess on success or a negative error code (see nrf_axon_result_e)