diff --git a/tests/lib/cmsis_dsp/filtering/CMakeLists.txt b/tests/lib/cmsis_dsp/filtering/CMakeLists.txt index 2d250b63ffb..98fc398e285 100644 --- a/tests/lib/cmsis_dsp/filtering/CMakeLists.txt +++ b/tests/lib/cmsis_dsp/filtering/CMakeLists.txt @@ -19,14 +19,18 @@ if(CONFIG_CMSIS_DSP_TEST_FILTERING_BIQUAD) ) endif() -target_sources_ifdef( - CONFIG_CMSIS_DSP_TEST_FILTERING_FIR - app PRIVATE - src/fir_q7.c - src/fir_q15.c - src/fir_q31.c - src/fir_f32.c - ) +if(CONFIG_CMSIS_DSP_TEST_FILTERING_FIR) + target_sources(app PRIVATE + src/fir_q7.c + src/fir_q15.c + src/fir_q31.c + src/fir_f32.c + ) + + target_sources_ifdef(CONFIG_CMSIS_DSP_FLOAT16 app PRIVATE + src/fir_f16.c + ) +endif() target_sources_ifdef( CONFIG_CMSIS_DSP_TEST_FILTERING_MISC diff --git a/tests/lib/cmsis_dsp/filtering/src/fir_f16.c b/tests/lib/cmsis_dsp/filtering/src/fir_f16.c new file mode 100644 index 00000000000..5f7b9ff3234 --- /dev/null +++ b/tests/lib/cmsis_dsp/filtering/src/fir_f16.c @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2021 Stephanos Ioannidis + * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include +#include "../../common/test_common.h" + +#include "fir_f16.pat" + +#define SNR_ERROR_THRESH ((float32_t)60) +#define REL_ERROR_THRESH (1.0e-2) + +static void test_arm_fir_f16(void) +{ + size_t sample_index, block_index; + size_t block_size, tap_count; + size_t sample_count = ARRAY_SIZE(in_config) / 2; + size_t length = ARRAY_SIZE(ref_val); + const uint16_t *config = in_config; + const float16_t *input = (const float16_t *)in_val; + const float16_t *coeff = (const float16_t *)in_coeff; + const float16_t *ref = (const float16_t *)ref_val; + float16_t *state, *output_buf, *output; + arm_fir_instance_f16 inst; + + /* Allocate buffers */ + state = malloc(2 * 47 * sizeof(float16_t)); + zassert_not_null(state, ASSERT_MSG_BUFFER_ALLOC_FAILED); + + output_buf = malloc(length * sizeof(float16_t)); + zassert_not_null(output_buf, ASSERT_MSG_BUFFER_ALLOC_FAILED); + + output = output_buf; + + /* Enumerate samples */ + for (sample_index = 0; sample_index < sample_count; sample_index++) { + /* Resolve sample configurations */ + block_size = config[0]; + tap_count = config[1]; + + /* Initialise instance */ + arm_fir_init_f16(&inst, tap_count, coeff, state, block_size); + + /* TODO: Add MEVF support */ + + /* Reset input pointer */ + input = (const float16_t *)in_val; + + /* Enumerate blocks */ + for (block_index = 0; block_index < 2; block_index++) { + /* Run test function */ + arm_fir_f16(&inst, input, output, block_size); + + /* Increment pointers */ + input += block_size; + output += block_size; + } + + /* Increment pointers */ + coeff += tap_count; + config += 2; + } + + /* Validate output */ + zassert_true( + test_snr_error_f16(length, output_buf, ref, SNR_ERROR_THRESH), + ASSERT_MSG_SNR_LIMIT_EXCEED); + + zassert_true( + test_rel_error_f16(length, output_buf, ref, REL_ERROR_THRESH), + ASSERT_MSG_REL_ERROR_LIMIT_EXCEED); + + /* Free buffers */ + free(state); + free(output_buf); +} + +void test_filtering_fir_f16(void) +{ + ztest_test_suite(filtering_fir_f16, + ztest_unit_test(test_arm_fir_f16) + ); + + ztest_run_test_suite(filtering_fir_f16); +} diff --git a/tests/lib/cmsis_dsp/filtering/src/fir_f16.pat b/tests/lib/cmsis_dsp/filtering/src/fir_f16.pat new file mode 100644 index 00000000000..758d2b63c17 --- /dev/null +++ b/tests/lib/cmsis_dsp/filtering/src/fir_f16.pat @@ -0,0 +1,232 @@ +static const uint16_t in_val[46] = { + 0x91bd, 0x2595, 0x270a, 0x26c5, 0x2010, 0x9f82, 0xa63d, 0xa7e8, + 0xa4dc, 0x9c98, 0x23d4, 0x27bd, 0x272e, 0x20de, 0xa02d, 0xa5e7, + 0xa76e, 0xa619, 0x1174, 0x24a3, 0x270e, 0x2650, 0x20c6, 0x9e4e, + 0xa680, 0xa79e, 0xa37c, 0x9525, 0x25da, 0x27ce, 0x2754, 0x2230, + 0xa134, 0xa62a, 0xa844, 0xa53b, 0x946f, 0x2518, 0x2749, 0x26d0, + 0x1e34, 0xa1bc, 0xa688, 0xa80e, 0xa57c, 0x1cd6 + }; + +static const uint16_t in_coeff[497] = { + 0x3800, 0x3400, 0x38cd, 0x3666, 0x3266, 0x3955, 0x3800, 0x3555, + 0x3155, 0x39b7, 0x3892, 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, + 0x3800, 0x3600, 0x3400, 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, + 0x3555, 0x331c, 0x2f1c, 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, + 0x34cd, 0x3266, 0x2e66, 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, + 0x3762, 0x3627, 0x34ec, 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, + 0x3ad1, 0x3a85, 0x3a39, 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, + 0x3872, 0x3826, 0x37b4, 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, + 0x3426, 0x331c, 0x31ed, 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, + 0x3400, 0x38cd, 0x3666, 0x3266, 0x3955, 0x3800, 0x3555, 0x3155, + 0x39b7, 0x3892, 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, + 0x3600, 0x3400, 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, + 0x331c, 0x2f1c, 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, + 0x3266, 0x2e66, 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, + 0x3627, 0x34ec, 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, + 0x3a85, 0x3a39, 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, + 0x3826, 0x37b4, 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, + 0x331c, 0x31ed, 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, + 0x38cd, 0x3666, 0x3266, 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, + 0x3892, 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, + 0x3400, 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, 0x331c, + 0x2f1c, 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, + 0x2e66, 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, + 0x34ec, 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, + 0x3a39, 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, 0x3826, + 0x37b4, 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, + 0x31ed, 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, + 0x3666, 0x3266, 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, + 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, + 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, + 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, + 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, + 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, + 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, + 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, + 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, 0x3666, + 0x3266, 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, 0x36db, + 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, 0x3000, + 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, 0x3a66, + 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, 0x3ac5, + 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, 0x3362, + 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, 0x39ed, + 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, 0x371c, + 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, 0x30be, + 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, 0x3666, 0x3266, + 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, 0x36db, 0x3492, + 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, 0x3000, 0x3a39, + 0x3955, 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, 0x3a66, 0x399a, + 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, 0x3ac5, 0x3a27, + 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, 0x3362, 0x30ec, + 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, 0x39ed, 0x39a1, + 0x3955, 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, 0x371c, 0x3685, + 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, 0x30be, 0x2f1c, + 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, 0x3666, 0x3266, 0x3955, + 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, 0x36db, 0x3492, 0x3092, + 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, 0x3000, 0x3a39, 0x3955, + 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, 0x3a66, 0x399a, 0x38cd, + 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, 0x3ac5, 0x3a27, 0x398a, + 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, 0x3362, 0x30ec, 0x2cec, + 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, 0x39ed, 0x39a1, 0x3955, + 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, 0x371c, 0x3685, 0x35ed, + 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, 0x30be, 0x2f1c, 0x2cbe, + 0x28be + }; + +static const uint16_t in_config[126] = { + 0x0001, 0x0002, 0x0001, 0x0003, 0x0001, 0x0004, 0x0001, 0x0005, + 0x0001, 0x0006, 0x0001, 0x0007, 0x0001, 0x0008, 0x0001, 0x000B, + 0x0001, 0x0019, 0x0002, 0x0002, 0x0002, 0x0003, 0x0002, 0x0004, + 0x0002, 0x0005, 0x0002, 0x0006, 0x0002, 0x0007, 0x0002, 0x0008, + 0x0002, 0x000B, 0x0002, 0x0019, 0x0003, 0x0002, 0x0003, 0x0003, + 0x0003, 0x0004, 0x0003, 0x0005, 0x0003, 0x0006, 0x0003, 0x0007, + 0x0003, 0x0008, 0x0003, 0x000B, 0x0003, 0x0019, 0x000C, 0x0002, + 0x000C, 0x0003, 0x000C, 0x0004, 0x000C, 0x0005, 0x000C, 0x0006, + 0x000C, 0x0007, 0x000C, 0x0008, 0x000C, 0x000B, 0x000C, 0x0019, + 0x000D, 0x0002, 0x000D, 0x0003, 0x000D, 0x0004, 0x000D, 0x0005, + 0x000D, 0x0006, 0x000D, 0x0007, 0x000D, 0x0008, 0x000D, 0x000B, + 0x000D, 0x0019, 0x000E, 0x0002, 0x000E, 0x0003, 0x000E, 0x0004, + 0x000E, 0x0005, 0x000E, 0x0006, 0x000E, 0x0007, 0x000E, 0x0008, + 0x000E, 0x000B, 0x000E, 0x0019, 0x000F, 0x0002, 0x000F, 0x0003, + 0x000F, 0x0004, 0x000F, 0x0005, 0x000F, 0x0006, 0x000F, 0x0007, + 0x000F, 0x0008, 0x000F, 0x000B, 0x000F, 0x0019 + }; + +static const uint16_t ref_val[1080] = { + 0x89bd, 0x1d39, 0x8897, 0x1c2e, 0x87a6, 0x1af7, 0x868e, 0x19f9, + 0x85bd, 0x1939, 0x8519, 0x18a5, 0x8497, 0x182e, 0x8388, 0x166e, + 0x81b3, 0x1231, 0x89bd, 0x1d39, 0x248d, 0x2536, 0x8897, 0x1c2e, + 0x2311, 0x2785, 0x87a6, 0x1af7, 0x21e4, 0x2625, 0x868e, 0x19f9, + 0x210c, 0x2545, 0x85bd, 0x1939, 0x206b, 0x249c, 0x8519, 0x18a5, + 0x1fda, 0x2419, 0x8497, 0x182e, 0x1f11, 0x2360, 0x8388, 0x166e, + 0x1d70, 0x21ac, 0x81b3, 0x1231, 0x193c, 0x1d77, 0x89bd, 0x1d39, + 0x248d, 0x2536, 0x23c9, 0x185f, 0x8897, 0x1c2e, 0x2311, 0x2785, + 0x2756, 0x247f, 0x87a6, 0x1af7, 0x21e4, 0x2625, 0x28eb, 0x2838, + 0x868e, 0x19f9, 0x210c, 0x2545, 0x2827, 0x299c, 0x85bd, 0x1939, + 0x206b, 0x249c, 0x2744, 0x28d8, 0x8519, 0x18a5, 0x1fda, 0x2419, + 0x2675, 0x284e, 0x8497, 0x182e, 0x1f11, 0x2360, 0x25d0, 0x27c0, + 0x8388, 0x166e, 0x1d70, 0x21ac, 0x2478, 0x25f6, 0x81b3, 0x1231, + 0x193c, 0x1d77, 0x204e, 0x21bd, 0x89bd, 0x1d39, 0x248d, 0x2536, + 0x23c9, 0x185f, 0xa0ff, 0xa518, 0xa52b, 0xa16f, 0x1676, 0x23c8, + 0x25aa, 0x2433, 0x198f, 0xa10a, 0xa4cf, 0xa53d, 0xa203, 0x1cfa, + 0x2415, 0x251b, 0x2382, 0x1a65, 0x8897, 0x1c2e, 0x2311, 0x2785, + 0x2756, 0x247f, 0x9a3d, 0xa534, 0xa7e1, 0xa6eb, 0xa130, 0x20d9, + 0x26e1, 0x2800, 0x24dd, 0x9871, 0xa519, 0xa7bb, 0xa6dd, 0xa154, + 0x22bc, 0x26de, 0x273c, 0x246d, 0x87a6, 0x1af7, 0x21e4, 0x2625, + 0x28eb, 0x2838, 0x23b9, 0xa1f6, 0xa7d1, 0xa8f6, 0xa76e, 0x9ce2, + 0x24f8, 0x28a3, 0x289b, 0x2453, 0xa141, 0xa7d6, 0xa8d4, 0xa72c, + 0x9d09, 0x25d6, 0x288f, 0x2832, 0x868e, 0x19f9, 0x210c, 0x2545, + 0x2827, 0x299c, 0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1, + 0x1a49, 0x2722, 0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e, + 0xa663, 0x192b, 0x27f0, 0x2941, 0x85bd, 0x1939, 0x206b, 0x249c, + 0x2744, 0x28d8, 0x29be, 0x2746, 0x17be, 0xa718, 0xa971, 0xa944, + 0xa53e, 0x2130, 0x283f, 0x2982, 0x2829, 0x1c1e, 0xa6b8, 0xa951, + 0xa902, 0xa502, 0x20bf, 0x28a9, 0x8519, 0x18a5, 0x1fda, 0x2419, + 0x2675, 0x284e, 0x2909, 0x2967, 0x25e7, 0x9c29, 0xa80c, 0xa969, + 0xa8c1, 0xa3af, 0x238a, 0x2873, 0x2938, 0x26ef, 0x9638, 0xa78f, + 0xa943, 0xa885, 0xa357, 0x2315, 0x8497, 0x182e, 0x1f11, 0x2360, + 0x25d0, 0x27c0, 0x2888, 0x28cb, 0x28e4, 0x24b2, 0x9f79, 0xa80f, + 0xa908, 0xa839, 0xa1dd, 0x241e, 0x283d, 0x28b0, 0x25d7, 0x9c3d, + 0xa787, 0xa8e7, 0xa803, 0xa183, 0x8388, 0x166e, 0x1d70, 0x21ac, + 0x2478, 0x25f6, 0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a, + 0x24d4, 0x9813, 0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695, + 0x2839, 0x2636, 0x1547, 0xa5c1, 0x81b3, 0x1231, 0x193c, 0x1d77, + 0x204e, 0x21bd, 0x22b6, 0x2319, 0x2320, 0x2311, 0x234c, 0x240d, + 0x24b8, 0x257a, 0x2629, 0x269f, 0x26cf, 0x26c5, 0x26bd, 0x26e1, + 0x2747, 0x27ea, 0x2851, 0x28a7, 0x89bd, 0x1d39, 0x248d, 0x2536, + 0x23c9, 0x185f, 0xa0ff, 0xa518, 0xa52b, 0xa16f, 0x1676, 0x23c8, + 0x25aa, 0x2433, 0x198f, 0xa10a, 0xa4cf, 0xa53d, 0xa203, 0x1cfa, + 0x2415, 0x251b, 0x2382, 0x1a65, 0xa0d3, 0xa528, 0x8897, 0x1c2e, + 0x2311, 0x2785, 0x2756, 0x247f, 0x9a3d, 0xa534, 0xa7e1, 0xa6eb, + 0xa130, 0x20d9, 0x26e1, 0x2800, 0x24dd, 0x9871, 0xa519, 0xa7bb, + 0xa6dd, 0xa154, 0x22bc, 0x26de, 0x273c, 0x246d, 0x97fa, 0xa512, + 0x87a6, 0x1af7, 0x21e4, 0x2625, 0x28eb, 0x2838, 0x23b9, 0xa1f6, + 0xa7d1, 0xa8f6, 0xa76e, 0x9ce2, 0x24f8, 0x28a3, 0x289b, 0x2453, + 0xa141, 0xa7d6, 0xa8d4, 0xa72c, 0x9d09, 0x25d6, 0x288f, 0x2832, + 0x2396, 0xa144, 0x868e, 0x19f9, 0x210c, 0x2545, 0x2827, 0x299c, + 0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1, 0x1a49, 0x2722, + 0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e, 0xa663, 0x192b, + 0x27f0, 0x2941, 0x2825, 0x2081, 0x85bd, 0x1939, 0x206b, 0x249c, + 0x2744, 0x28d8, 0x29be, 0x2746, 0x17be, 0xa718, 0xa971, 0xa944, + 0xa53e, 0x2130, 0x283f, 0x2982, 0x2829, 0x1c1e, 0xa6b8, 0xa951, + 0xa902, 0xa502, 0x20bf, 0x28a9, 0x295d, 0x2743, 0x8519, 0x18a5, + 0x1fda, 0x2419, 0x2675, 0x284e, 0x2909, 0x2967, 0x25e7, 0x9c29, + 0xa80c, 0xa969, 0xa8c1, 0xa3af, 0x238a, 0x2873, 0x2938, 0x26ef, + 0x9638, 0xa78f, 0xa943, 0xa885, 0xa357, 0x2315, 0x28d6, 0x2908, + 0x8497, 0x182e, 0x1f11, 0x2360, 0x25d0, 0x27c0, 0x2888, 0x28cb, + 0x28e4, 0x24b2, 0x9f79, 0xa80f, 0xa908, 0xa839, 0xa1dd, 0x241e, + 0x283d, 0x28b0, 0x25d7, 0x9c3d, 0xa787, 0xa8e7, 0xa803, 0xa183, + 0x23a7, 0x2898, 0x8388, 0x166e, 0x1d70, 0x21ac, 0x2478, 0x25f6, + 0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a, 0x24d4, 0x9813, + 0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695, 0x2839, 0x2636, + 0x1547, 0xa5c1, 0xa841, 0xa7dc, 0x81b3, 0x1231, 0x193c, 0x1d77, + 0x204e, 0x21bd, 0x22b6, 0x2319, 0x2320, 0x2311, 0x234c, 0x240d, + 0x24b8, 0x257a, 0x2629, 0x269f, 0x26cf, 0x26c5, 0x26bd, 0x26e1, + 0x2747, 0x27ea, 0x2851, 0x28a7, 0x28dd, 0x2905, 0x89bd, 0x1d39, + 0x248d, 0x2536, 0x23c9, 0x185f, 0xa0ff, 0xa518, 0xa52b, 0xa16f, + 0x1676, 0x23c8, 0x25aa, 0x2433, 0x198f, 0xa10a, 0xa4cf, 0xa53d, + 0xa203, 0x1cfa, 0x2415, 0x251b, 0x2382, 0x1a65, 0xa0d3, 0xa528, + 0xa4bf, 0x9fce, 0x8897, 0x1c2e, 0x2311, 0x2785, 0x2756, 0x247f, + 0x9a3d, 0xa534, 0xa7e1, 0xa6eb, 0xa130, 0x20d9, 0x26e1, 0x2800, + 0x24dd, 0x9871, 0xa519, 0xa7bb, 0xa6dd, 0xa154, 0x22bc, 0x26de, + 0x273c, 0x246d, 0x97fa, 0xa512, 0xa7b2, 0xa622, 0x87a6, 0x1af7, + 0x21e4, 0x2625, 0x28eb, 0x2838, 0x23b9, 0xa1f6, 0xa7d1, 0xa8f6, + 0xa76e, 0x9ce2, 0x24f8, 0x28a3, 0x289b, 0x2453, 0xa141, 0xa7d6, + 0xa8d4, 0xa72c, 0x9d09, 0x25d6, 0x288f, 0x2832, 0x2396, 0xa144, + 0xa777, 0xa8b9, 0x868e, 0x19f9, 0x210c, 0x2545, 0x2827, 0x299c, + 0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1, 0x1a49, 0x2722, + 0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e, 0xa663, 0x192b, + 0x27f0, 0x2941, 0x2825, 0x2081, 0xa4b1, 0xa89c, 0x85bd, 0x1939, + 0x206b, 0x249c, 0x2744, 0x28d8, 0x29be, 0x2746, 0x17be, 0xa718, + 0xa971, 0xa944, 0xa53e, 0x2130, 0x283f, 0x2982, 0x2829, 0x1c1e, + 0xa6b8, 0xa951, 0xa902, 0xa502, 0x20bf, 0x28a9, 0x295d, 0x2743, + 0x1908, 0xa647, 0x8519, 0x18a5, 0x1fda, 0x2419, 0x2675, 0x284e, + 0x2909, 0x2967, 0x25e7, 0x9c29, 0xa80c, 0xa969, 0xa8c1, 0xa3af, + 0x238a, 0x2873, 0x2938, 0x26ef, 0x9638, 0xa78f, 0xa943, 0xa885, + 0xa357, 0x2315, 0x28d6, 0x2908, 0x260c, 0x995b, 0x8497, 0x182e, + 0x1f11, 0x2360, 0x25d0, 0x27c0, 0x2888, 0x28cb, 0x28e4, 0x24b2, + 0x9f79, 0xa80f, 0xa908, 0xa839, 0xa1dd, 0x241e, 0x283d, 0x28b0, + 0x25d7, 0x9c3d, 0xa787, 0xa8e7, 0xa803, 0xa183, 0x23a7, 0x2898, + 0x2893, 0x250a, 0x8388, 0x166e, 0x1d70, 0x21ac, 0x2478, 0x25f6, + 0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a, 0x24d4, 0x9813, + 0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695, 0x2839, 0x2636, + 0x1547, 0xa5c1, 0xa841, 0xa7dc, 0xa3a4, 0x201e, 0x81b3, 0x1231, + 0x193c, 0x1d77, 0x204e, 0x21bd, 0x22b6, 0x2319, 0x2320, 0x2311, + 0x234c, 0x240d, 0x24b8, 0x257a, 0x2629, 0x269f, 0x26cf, 0x26c5, + 0x26bd, 0x26e1, 0x2747, 0x27ea, 0x2851, 0x28a7, 0x28dd, 0x2905, + 0x24ac, 0xa0a1, 0x89bd, 0x1d39, 0x248d, 0x2536, 0x23c9, 0x185f, + 0xa0ff, 0xa518, 0xa52b, 0xa16f, 0x1676, 0x23c8, 0x25aa, 0x2433, + 0x198f, 0xa10a, 0xa4cf, 0xa53d, 0xa203, 0x1cfa, 0x2415, 0x251b, + 0x2382, 0x1a65, 0xa0d3, 0xa528, 0xa4bf, 0x9fce, 0x1d35, 0x24e0, + 0x8897, 0x1c2e, 0x2311, 0x2785, 0x2756, 0x247f, 0x9a3d, 0xa534, + 0xa7e1, 0xa6eb, 0xa130, 0x20d9, 0x26e1, 0x2800, 0x24dd, 0x9871, + 0xa519, 0xa7bb, 0xa6dd, 0xa154, 0x22bc, 0x26de, 0x273c, 0x246d, + 0x97fa, 0xa512, 0xa7b2, 0xa622, 0x9cd1, 0x236b, 0x87a6, 0x1af7, + 0x21e4, 0x2625, 0x28eb, 0x2838, 0x23b9, 0xa1f6, 0xa7d1, 0xa8f6, + 0xa76e, 0x9ce2, 0x24f8, 0x28a3, 0x289b, 0x2453, 0xa141, 0xa7d6, + 0xa8d4, 0xa72c, 0x9d09, 0x25d6, 0x288f, 0x2832, 0x2396, 0xa144, + 0xa777, 0xa8b9, 0xa615, 0x18c4, 0x868e, 0x19f9, 0x210c, 0x2545, + 0x2827, 0x299c, 0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1, + 0x1a49, 0x2722, 0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e, + 0xa663, 0x192b, 0x27f0, 0x2941, 0x2825, 0x2081, 0xa4b1, 0xa89c, + 0xa8ee, 0xa4ee, 0x85bd, 0x1939, 0x206b, 0x249c, 0x2744, 0x28d8, + 0x29be, 0x2746, 0x17be, 0xa718, 0xa971, 0xa944, 0xa53e, 0x2130, + 0x283f, 0x2982, 0x2829, 0x1c1e, 0xa6b8, 0xa951, 0xa902, 0xa502, + 0x20bf, 0x28a9, 0x295d, 0x2743, 0x1908, 0xa647, 0xa8e7, 0xa898, + 0x8519, 0x18a5, 0x1fda, 0x2419, 0x2675, 0x284e, 0x2909, 0x2967, + 0x25e7, 0x9c29, 0xa80c, 0xa969, 0xa8c1, 0xa3af, 0x238a, 0x2873, + 0x2938, 0x26ef, 0x9638, 0xa78f, 0xa943, 0xa885, 0xa357, 0x2315, + 0x28d6, 0x2908, 0x260c, 0x995b, 0xa6dc, 0xa8b2, 0x8497, 0x182e, + 0x1f11, 0x2360, 0x25d0, 0x27c0, 0x2888, 0x28cb, 0x28e4, 0x24b2, + 0x9f79, 0xa80f, 0xa908, 0xa839, 0xa1dd, 0x241e, 0x283d, 0x28b0, + 0x25d7, 0x9c3d, 0xa787, 0xa8e7, 0xa803, 0xa183, 0x23a7, 0x2898, + 0x2893, 0x250a, 0x9c7e, 0xa68c, 0x8388, 0x166e, 0x1d70, 0x21ac, + 0x2478, 0x25f6, 0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a, + 0x24d4, 0x9813, 0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695, + 0x2839, 0x2636, 0x1547, 0xa5c1, 0xa841, 0xa7dc, 0xa3a4, 0x201e, + 0x27bb, 0x2858, 0x81b3, 0x1231, 0x193c, 0x1d77, 0x204e, 0x21bd, + 0x22b6, 0x2319, 0x2320, 0x2311, 0x234c, 0x240d, 0x24b8, 0x257a, + 0x2629, 0x269f, 0x26cf, 0x26c5, 0x26bd, 0x26e1, 0x2747, 0x27ea, + 0x2851, 0x28a7, 0x28dd, 0x2905, 0x24ac, 0xa0a1, 0xa88b, 0xa9a1 + }; + diff --git a/tests/lib/cmsis_dsp/filtering/src/main.c b/tests/lib/cmsis_dsp/filtering/src/main.c index f34ebe48d5d..54a79c1deb2 100644 --- a/tests/lib/cmsis_dsp/filtering/src/main.c +++ b/tests/lib/cmsis_dsp/filtering/src/main.c @@ -16,6 +16,7 @@ extern void test_filtering_biquad_f64(void); extern void test_filtering_fir_q7(void); extern void test_filtering_fir_q15(void); extern void test_filtering_fir_q31(void); +extern void test_filtering_fir_f16(void); extern void test_filtering_fir_f32(void); extern void test_filtering_misc_q7(void); @@ -39,6 +40,9 @@ void test_main(void) test_filtering_fir_q7(); test_filtering_fir_q15(); test_filtering_fir_q31(); +#ifdef CONFIG_CMSIS_DSP_FLOAT16 + test_filtering_fir_f16(); +#endif test_filtering_fir_f32(); #endif