![]() |
Edge AI Add-on API 2.2.0
|
| 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.
| input_ptr | pointer to the input, 16bit integer. |
| filter_ptr | pointer to the filter coefficients, 16bit integer. |
| out_ptr | pointer to the output, saturated to int32. 1st valid output starts at offset 0. Output can overlap/overwrite input. |
| input_length | length of the input (in elements). Minimum 4, maximum 512, input_length >= filter_length. |
| filter_length | length of the filter (in elements). Minimum 4, maximum 32, input_length >= filter_length. |
| decimate | decimation factor. This input_ptr is advanced by this many elements after each output. minimum 1, maximum 16 |
| rounding_bits | number of bits to round the output by. |
| block_mode | recommended to be set to NRF_AXON_SYNC_MODE_BLOCKING_POLLING. |
| keep_reservation | set 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. |