1 | /* ----------------------------------------------------------------------
|
---|
2 | * Project: CMSIS DSP Library
|
---|
3 | * Title: arm_const_structs.c
|
---|
4 | * Description: Constant structs that are initialized for user convenience.
|
---|
5 | * For example, some can be given as arguments to the arm_cfft_f32() or arm_rfft_f32() functions.
|
---|
6 | *
|
---|
7 | * $Date: 27. January 2017
|
---|
8 | * $Revision: V.1.5.1
|
---|
9 | *
|
---|
10 | * Target Processor: Cortex-M cores
|
---|
11 | * -------------------------------------------------------------------- */
|
---|
12 | /*
|
---|
13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
|
---|
14 | *
|
---|
15 | * SPDX-License-Identifier: Apache-2.0
|
---|
16 | *
|
---|
17 | * Licensed under the Apache License, Version 2.0 (the License); you may
|
---|
18 | * not use this file except in compliance with the License.
|
---|
19 | * You may obtain a copy of the License at
|
---|
20 | *
|
---|
21 | * www.apache.org/licenses/LICENSE-2.0
|
---|
22 | *
|
---|
23 | * Unless required by applicable law or agreed to in writing, software
|
---|
24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
---|
25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
26 | * See the License for the specific language governing permissions and
|
---|
27 | * limitations under the License.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #include "arm_const_structs.h"
|
---|
31 |
|
---|
32 | /* Floating-point structs */
|
---|
33 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len16 = {
|
---|
34 | 16, twiddleCoef_16, armBitRevIndexTable16, ARMBITREVINDEXTABLE_16_TABLE_LENGTH
|
---|
35 | };
|
---|
36 |
|
---|
37 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len32 = {
|
---|
38 | 32, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_32_TABLE_LENGTH
|
---|
39 | };
|
---|
40 |
|
---|
41 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len64 = {
|
---|
42 | 64, twiddleCoef_64, armBitRevIndexTable64, ARMBITREVINDEXTABLE_64_TABLE_LENGTH
|
---|
43 | };
|
---|
44 |
|
---|
45 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len128 = {
|
---|
46 | 128, twiddleCoef_128, armBitRevIndexTable128, ARMBITREVINDEXTABLE_128_TABLE_LENGTH
|
---|
47 | };
|
---|
48 |
|
---|
49 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len256 = {
|
---|
50 | 256, twiddleCoef_256, armBitRevIndexTable256, ARMBITREVINDEXTABLE_256_TABLE_LENGTH
|
---|
51 | };
|
---|
52 |
|
---|
53 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len512 = {
|
---|
54 | 512, twiddleCoef_512, armBitRevIndexTable512, ARMBITREVINDEXTABLE_512_TABLE_LENGTH
|
---|
55 | };
|
---|
56 |
|
---|
57 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024 = {
|
---|
58 | 1024, twiddleCoef_1024, armBitRevIndexTable1024, ARMBITREVINDEXTABLE_1024_TABLE_LENGTH
|
---|
59 | };
|
---|
60 |
|
---|
61 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048 = {
|
---|
62 | 2048, twiddleCoef_2048, armBitRevIndexTable2048, ARMBITREVINDEXTABLE_2048_TABLE_LENGTH
|
---|
63 | };
|
---|
64 |
|
---|
65 | const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096 = {
|
---|
66 | 4096, twiddleCoef_4096, armBitRevIndexTable4096, ARMBITREVINDEXTABLE_4096_TABLE_LENGTH
|
---|
67 | };
|
---|
68 |
|
---|
69 | /* Fixed-point structs */
|
---|
70 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len16 = {
|
---|
71 | 16, twiddleCoef_16_q31, armBitRevIndexTable_fixed_16, ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH
|
---|
72 | };
|
---|
73 |
|
---|
74 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len32 = {
|
---|
75 | 32, twiddleCoef_32_q31, armBitRevIndexTable_fixed_32, ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH
|
---|
76 | };
|
---|
77 |
|
---|
78 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len64 = {
|
---|
79 | 64, twiddleCoef_64_q31, armBitRevIndexTable_fixed_64, ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH
|
---|
80 | };
|
---|
81 |
|
---|
82 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len128 = {
|
---|
83 | 128, twiddleCoef_128_q31, armBitRevIndexTable_fixed_128, ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH
|
---|
84 | };
|
---|
85 |
|
---|
86 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len256 = {
|
---|
87 | 256, twiddleCoef_256_q31, armBitRevIndexTable_fixed_256, ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH
|
---|
88 | };
|
---|
89 |
|
---|
90 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len512 = {
|
---|
91 | 512, twiddleCoef_512_q31, armBitRevIndexTable_fixed_512, ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH
|
---|
92 | };
|
---|
93 |
|
---|
94 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024 = {
|
---|
95 | 1024, twiddleCoef_1024_q31, armBitRevIndexTable_fixed_1024, ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH
|
---|
96 | };
|
---|
97 |
|
---|
98 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048 = {
|
---|
99 | 2048, twiddleCoef_2048_q31, armBitRevIndexTable_fixed_2048, ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH
|
---|
100 | };
|
---|
101 |
|
---|
102 | const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096 = {
|
---|
103 | 4096, twiddleCoef_4096_q31, armBitRevIndexTable_fixed_4096, ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH
|
---|
104 | };
|
---|
105 |
|
---|
106 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len16 = {
|
---|
107 | 16, twiddleCoef_16_q15, armBitRevIndexTable_fixed_16, ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH
|
---|
108 | };
|
---|
109 |
|
---|
110 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len32 = {
|
---|
111 | 32, twiddleCoef_32_q15, armBitRevIndexTable_fixed_32, ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH
|
---|
112 | };
|
---|
113 |
|
---|
114 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len64 = {
|
---|
115 | 64, twiddleCoef_64_q15, armBitRevIndexTable_fixed_64, ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH
|
---|
116 | };
|
---|
117 |
|
---|
118 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len128 = {
|
---|
119 | 128, twiddleCoef_128_q15, armBitRevIndexTable_fixed_128, ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH
|
---|
120 | };
|
---|
121 |
|
---|
122 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len256 = {
|
---|
123 | 256, twiddleCoef_256_q15, armBitRevIndexTable_fixed_256, ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH
|
---|
124 | };
|
---|
125 |
|
---|
126 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len512 = {
|
---|
127 | 512, twiddleCoef_512_q15, armBitRevIndexTable_fixed_512, ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH
|
---|
128 | };
|
---|
129 |
|
---|
130 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024 = {
|
---|
131 | 1024, twiddleCoef_1024_q15, armBitRevIndexTable_fixed_1024, ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH
|
---|
132 | };
|
---|
133 |
|
---|
134 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048 = {
|
---|
135 | 2048, twiddleCoef_2048_q15, armBitRevIndexTable_fixed_2048, ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH
|
---|
136 | };
|
---|
137 |
|
---|
138 | const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096 = {
|
---|
139 | 4096, twiddleCoef_4096_q15, armBitRevIndexTable_fixed_4096, ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH
|
---|
140 | };
|
---|
141 |
|
---|
142 | /* Structure for real-value inputs */
|
---|
143 | /* Floating-point structs */
|
---|
144 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len32 = {
|
---|
145 | { 16, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_16_TABLE_LENGTH },
|
---|
146 | 32U,
|
---|
147 | (float32_t *)twiddleCoef_rfft_32
|
---|
148 | };
|
---|
149 |
|
---|
150 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len64 = {
|
---|
151 | { 32, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_32_TABLE_LENGTH },
|
---|
152 | 64U,
|
---|
153 | (float32_t *)twiddleCoef_rfft_64
|
---|
154 | };
|
---|
155 |
|
---|
156 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len128 = {
|
---|
157 | { 64, twiddleCoef_64, armBitRevIndexTable64, ARMBITREVINDEXTABLE_64_TABLE_LENGTH },
|
---|
158 | 128U,
|
---|
159 | (float32_t *)twiddleCoef_rfft_128
|
---|
160 | };
|
---|
161 |
|
---|
162 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len256 = {
|
---|
163 | { 128, twiddleCoef_128, armBitRevIndexTable128, ARMBITREVINDEXTABLE_128_TABLE_LENGTH },
|
---|
164 | 256U,
|
---|
165 | (float32_t *)twiddleCoef_rfft_256
|
---|
166 | };
|
---|
167 |
|
---|
168 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len512 = {
|
---|
169 | { 256, twiddleCoef_256, armBitRevIndexTable256, ARMBITREVINDEXTABLE_256_TABLE_LENGTH },
|
---|
170 | 512U,
|
---|
171 | (float32_t *)twiddleCoef_rfft_512
|
---|
172 | };
|
---|
173 |
|
---|
174 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len1024 = {
|
---|
175 | { 512, twiddleCoef_512, armBitRevIndexTable512, ARMBITREVINDEXTABLE_512_TABLE_LENGTH },
|
---|
176 | 1024U,
|
---|
177 | (float32_t *)twiddleCoef_rfft_1024
|
---|
178 | };
|
---|
179 |
|
---|
180 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len2048 = {
|
---|
181 | { 1024, twiddleCoef_1024, armBitRevIndexTable1024, ARMBITREVINDEXTABLE_1024_TABLE_LENGTH },
|
---|
182 | 2048U,
|
---|
183 | (float32_t *)twiddleCoef_rfft_2048
|
---|
184 | };
|
---|
185 |
|
---|
186 | const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len4096 = {
|
---|
187 | { 2048, twiddleCoef_2048, armBitRevIndexTable2048, ARMBITREVINDEXTABLE_2048_TABLE_LENGTH },
|
---|
188 | 4096U,
|
---|
189 | (float32_t *)twiddleCoef_rfft_4096
|
---|
190 | };
|
---|
191 |
|
---|
192 | /* Fixed-point structs */
|
---|
193 | /* q31_t */
|
---|
194 | extern const q31_t realCoefAQ31[8192];
|
---|
195 | extern const q31_t realCoefBQ31[8192];
|
---|
196 |
|
---|
197 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len32 = {
|
---|
198 | 32U,
|
---|
199 | 0,
|
---|
200 | 1,
|
---|
201 | 256U,
|
---|
202 | (q31_t*)realCoefAQ31,
|
---|
203 | (q31_t*)realCoefBQ31,
|
---|
204 | &arm_cfft_sR_q31_len16
|
---|
205 | };
|
---|
206 |
|
---|
207 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len64 = {
|
---|
208 | 64U,
|
---|
209 | 0,
|
---|
210 | 1,
|
---|
211 | 128U,
|
---|
212 | (q31_t*)realCoefAQ31,
|
---|
213 | (q31_t*)realCoefBQ31,
|
---|
214 | &arm_cfft_sR_q31_len32
|
---|
215 | };
|
---|
216 |
|
---|
217 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len128 = {
|
---|
218 | 128U,
|
---|
219 | 0,
|
---|
220 | 1,
|
---|
221 | 64U,
|
---|
222 | (q31_t*)realCoefAQ31,
|
---|
223 | (q31_t*)realCoefBQ31,
|
---|
224 | &arm_cfft_sR_q31_len64
|
---|
225 | };
|
---|
226 |
|
---|
227 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len256 = {
|
---|
228 | 256U,
|
---|
229 | 0,
|
---|
230 | 1,
|
---|
231 | 32U,
|
---|
232 | (q31_t*)realCoefAQ31,
|
---|
233 | (q31_t*)realCoefBQ31,
|
---|
234 | &arm_cfft_sR_q31_len128
|
---|
235 | };
|
---|
236 |
|
---|
237 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len512 = {
|
---|
238 | 512U,
|
---|
239 | 0,
|
---|
240 | 1,
|
---|
241 | 16U,
|
---|
242 | (q31_t*)realCoefAQ31,
|
---|
243 | (q31_t*)realCoefBQ31,
|
---|
244 | &arm_cfft_sR_q31_len256
|
---|
245 | };
|
---|
246 |
|
---|
247 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len1024 = {
|
---|
248 | 1024U,
|
---|
249 | 0,
|
---|
250 | 1,
|
---|
251 | 8U,
|
---|
252 | (q31_t*)realCoefAQ31,
|
---|
253 | (q31_t*)realCoefBQ31,
|
---|
254 | &arm_cfft_sR_q31_len512
|
---|
255 | };
|
---|
256 |
|
---|
257 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len2048 = {
|
---|
258 | 2048U,
|
---|
259 | 0,
|
---|
260 | 1,
|
---|
261 | 4U,
|
---|
262 | (q31_t*)realCoefAQ31,
|
---|
263 | (q31_t*)realCoefBQ31,
|
---|
264 | &arm_cfft_sR_q31_len1024
|
---|
265 | };
|
---|
266 |
|
---|
267 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len4096 = {
|
---|
268 | 4096U,
|
---|
269 | 0,
|
---|
270 | 1,
|
---|
271 | 2U,
|
---|
272 | (q31_t*)realCoefAQ31,
|
---|
273 | (q31_t*)realCoefBQ31,
|
---|
274 | &arm_cfft_sR_q31_len2048
|
---|
275 | };
|
---|
276 |
|
---|
277 | const arm_rfft_instance_q31 arm_rfft_sR_q31_len8192 = {
|
---|
278 | 8192U,
|
---|
279 | 0,
|
---|
280 | 1,
|
---|
281 | 1U,
|
---|
282 | (q31_t*)realCoefAQ31,
|
---|
283 | (q31_t*)realCoefBQ31,
|
---|
284 | &arm_cfft_sR_q31_len4096
|
---|
285 | };
|
---|
286 |
|
---|
287 | /* q15_t */
|
---|
288 | extern const q15_t realCoefAQ15[8192];
|
---|
289 | extern const q15_t realCoefBQ15[8192];
|
---|
290 |
|
---|
291 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len32 = {
|
---|
292 | 32U,
|
---|
293 | 0,
|
---|
294 | 1,
|
---|
295 | 256U,
|
---|
296 | (q15_t*)realCoefAQ15,
|
---|
297 | (q15_t*)realCoefBQ15,
|
---|
298 | &arm_cfft_sR_q15_len16
|
---|
299 | };
|
---|
300 |
|
---|
301 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len64 = {
|
---|
302 | 64U,
|
---|
303 | 0,
|
---|
304 | 1,
|
---|
305 | 128U,
|
---|
306 | (q15_t*)realCoefAQ15,
|
---|
307 | (q15_t*)realCoefBQ15,
|
---|
308 | &arm_cfft_sR_q15_len32
|
---|
309 | };
|
---|
310 |
|
---|
311 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len128 = {
|
---|
312 | 128U,
|
---|
313 | 0,
|
---|
314 | 1,
|
---|
315 | 64U,
|
---|
316 | (q15_t*)realCoefAQ15,
|
---|
317 | (q15_t*)realCoefBQ15,
|
---|
318 | &arm_cfft_sR_q15_len64
|
---|
319 | };
|
---|
320 |
|
---|
321 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len256 = {
|
---|
322 | 256U,
|
---|
323 | 0,
|
---|
324 | 1,
|
---|
325 | 32U,
|
---|
326 | (q15_t*)realCoefAQ15,
|
---|
327 | (q15_t*)realCoefBQ15,
|
---|
328 | &arm_cfft_sR_q15_len128
|
---|
329 | };
|
---|
330 |
|
---|
331 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len512 = {
|
---|
332 | 512U,
|
---|
333 | 0,
|
---|
334 | 1,
|
---|
335 | 16U,
|
---|
336 | (q15_t*)realCoefAQ15,
|
---|
337 | (q15_t*)realCoefBQ15,
|
---|
338 | &arm_cfft_sR_q15_len256
|
---|
339 | };
|
---|
340 |
|
---|
341 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len1024 = {
|
---|
342 | 1024U,
|
---|
343 | 0,
|
---|
344 | 1,
|
---|
345 | 8U,
|
---|
346 | (q15_t*)realCoefAQ15,
|
---|
347 | (q15_t*)realCoefBQ15,
|
---|
348 | &arm_cfft_sR_q15_len512
|
---|
349 | };
|
---|
350 |
|
---|
351 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len2048 = {
|
---|
352 | 2048U,
|
---|
353 | 0,
|
---|
354 | 1,
|
---|
355 | 4U,
|
---|
356 | (q15_t*)realCoefAQ15,
|
---|
357 | (q15_t*)realCoefBQ15,
|
---|
358 | &arm_cfft_sR_q15_len1024
|
---|
359 | };
|
---|
360 |
|
---|
361 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len4096 = {
|
---|
362 | 4096U,
|
---|
363 | 0,
|
---|
364 | 1,
|
---|
365 | 2U,
|
---|
366 | (q15_t*)realCoefAQ15,
|
---|
367 | (q15_t*)realCoefBQ15,
|
---|
368 | &arm_cfft_sR_q15_len2048
|
---|
369 | };
|
---|
370 |
|
---|
371 | const arm_rfft_instance_q15 arm_rfft_sR_q15_len8192 = {
|
---|
372 | 8192U,
|
---|
373 | 0,
|
---|
374 | 1,
|
---|
375 | 1U,
|
---|
376 | (q15_t*)realCoefAQ15,
|
---|
377 | (q15_t*)realCoefBQ15,
|
---|
378 | &arm_cfft_sR_q15_len4096
|
---|
379 | };
|
---|