Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
arm_common_tables.h
00001 /* ---------------------------------------------------------------------- 00002 * Copyright (C) 2010-2014 ARM Limited. All rights reserved. 00003 * 00004 * $Date: 19. March 2015 00005 * $Revision: V.1.4.5 00006 * 00007 * Project: CMSIS DSP Library 00008 * Title: arm_common_tables.h 00009 * 00010 * Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions 00011 * 00012 * Target Processor: Cortex-M4/Cortex-M3 00013 * 00014 * Redistribution and use in source and binary forms, with or without 00015 * modification, are permitted provided that the following conditions 00016 * are met: 00017 * - Redistributions of source code must retain the above copyright 00018 * notice, this list of conditions and the following disclaimer. 00019 * - Redistributions in binary form must reproduce the above copyright 00020 * notice, this list of conditions and the following disclaimer in 00021 * the documentation and/or other materials provided with the 00022 * distribution. 00023 * - Neither the name of ARM LIMITED nor the names of its contributors 00024 * may be used to endorse or promote products derived from this 00025 * software without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00028 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00029 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00030 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00031 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00032 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00033 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00034 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00035 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00036 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00037 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00038 * POSSIBILITY OF SUCH DAMAGE. 00039 * -------------------------------------------------------------------- */ 00040 00041 #ifndef _ARM_COMMON_TABLES_H 00042 #define _ARM_COMMON_TABLES_H 00043 00044 #include "arm_math.h" 00045 00046 extern const uint16_t armBitRevTable[1024]; 00047 extern const q15_t armRecipTableQ15[64]; 00048 extern const q31_t armRecipTableQ31[64]; 00049 //extern const q31_t realCoefAQ31[1024]; 00050 //extern const q31_t realCoefBQ31[1024]; 00051 extern const float32_t twiddleCoef_16[32]; 00052 extern const float32_t twiddleCoef_32[64]; 00053 extern const float32_t twiddleCoef_64[128]; 00054 extern const float32_t twiddleCoef_128[256]; 00055 extern const float32_t twiddleCoef_256[512]; 00056 extern const float32_t twiddleCoef_512[1024]; 00057 extern const float32_t twiddleCoef_1024[2048]; 00058 extern const float32_t twiddleCoef_2048[4096]; 00059 extern const float32_t twiddleCoef_4096[8192]; 00060 #define twiddleCoef twiddleCoef_4096 00061 extern const q31_t twiddleCoef_16_q31[24]; 00062 extern const q31_t twiddleCoef_32_q31[48]; 00063 extern const q31_t twiddleCoef_64_q31[96]; 00064 extern const q31_t twiddleCoef_128_q31[192]; 00065 extern const q31_t twiddleCoef_256_q31[384]; 00066 extern const q31_t twiddleCoef_512_q31[768]; 00067 extern const q31_t twiddleCoef_1024_q31[1536]; 00068 extern const q31_t twiddleCoef_2048_q31[3072]; 00069 extern const q31_t twiddleCoef_4096_q31[6144]; 00070 extern const q15_t twiddleCoef_16_q15[24]; 00071 extern const q15_t twiddleCoef_32_q15[48]; 00072 extern const q15_t twiddleCoef_64_q15[96]; 00073 extern const q15_t twiddleCoef_128_q15[192]; 00074 extern const q15_t twiddleCoef_256_q15[384]; 00075 extern const q15_t twiddleCoef_512_q15[768]; 00076 extern const q15_t twiddleCoef_1024_q15[1536]; 00077 extern const q15_t twiddleCoef_2048_q15[3072]; 00078 extern const q15_t twiddleCoef_4096_q15[6144]; 00079 extern const float32_t twiddleCoef_rfft_32[32]; 00080 extern const float32_t twiddleCoef_rfft_64[64]; 00081 extern const float32_t twiddleCoef_rfft_128[128]; 00082 extern const float32_t twiddleCoef_rfft_256[256]; 00083 extern const float32_t twiddleCoef_rfft_512[512]; 00084 extern const float32_t twiddleCoef_rfft_1024[1024]; 00085 extern const float32_t twiddleCoef_rfft_2048[2048]; 00086 extern const float32_t twiddleCoef_rfft_4096[4096]; 00087 00088 00089 /* floating-point bit reversal tables */ 00090 #define ARMBITREVINDEXTABLE__16_TABLE_LENGTH ((uint16_t)20 ) 00091 #define ARMBITREVINDEXTABLE__32_TABLE_LENGTH ((uint16_t)48 ) 00092 #define ARMBITREVINDEXTABLE__64_TABLE_LENGTH ((uint16_t)56 ) 00093 #define ARMBITREVINDEXTABLE_128_TABLE_LENGTH ((uint16_t)208 ) 00094 #define ARMBITREVINDEXTABLE_256_TABLE_LENGTH ((uint16_t)440 ) 00095 #define ARMBITREVINDEXTABLE_512_TABLE_LENGTH ((uint16_t)448 ) 00096 #define ARMBITREVINDEXTABLE1024_TABLE_LENGTH ((uint16_t)1800) 00097 #define ARMBITREVINDEXTABLE2048_TABLE_LENGTH ((uint16_t)3808) 00098 #define ARMBITREVINDEXTABLE4096_TABLE_LENGTH ((uint16_t)4032) 00099 00100 extern const uint16_t armBitRevIndexTable16[ARMBITREVINDEXTABLE__16_TABLE_LENGTH]; 00101 extern const uint16_t armBitRevIndexTable32[ARMBITREVINDEXTABLE__32_TABLE_LENGTH]; 00102 extern const uint16_t armBitRevIndexTable64[ARMBITREVINDEXTABLE__64_TABLE_LENGTH]; 00103 extern const uint16_t armBitRevIndexTable128[ARMBITREVINDEXTABLE_128_TABLE_LENGTH]; 00104 extern const uint16_t armBitRevIndexTable256[ARMBITREVINDEXTABLE_256_TABLE_LENGTH]; 00105 extern const uint16_t armBitRevIndexTable512[ARMBITREVINDEXTABLE_512_TABLE_LENGTH]; 00106 extern const uint16_t armBitRevIndexTable1024[ARMBITREVINDEXTABLE1024_TABLE_LENGTH]; 00107 extern const uint16_t armBitRevIndexTable2048[ARMBITREVINDEXTABLE2048_TABLE_LENGTH]; 00108 extern const uint16_t armBitRevIndexTable4096[ARMBITREVINDEXTABLE4096_TABLE_LENGTH]; 00109 00110 /* fixed-point bit reversal tables */ 00111 #define ARMBITREVINDEXTABLE_FIXED___16_TABLE_LENGTH ((uint16_t)12 ) 00112 #define ARMBITREVINDEXTABLE_FIXED___32_TABLE_LENGTH ((uint16_t)24 ) 00113 #define ARMBITREVINDEXTABLE_FIXED___64_TABLE_LENGTH ((uint16_t)56 ) 00114 #define ARMBITREVINDEXTABLE_FIXED__128_TABLE_LENGTH ((uint16_t)112 ) 00115 #define ARMBITREVINDEXTABLE_FIXED__256_TABLE_LENGTH ((uint16_t)240 ) 00116 #define ARMBITREVINDEXTABLE_FIXED__512_TABLE_LENGTH ((uint16_t)480 ) 00117 #define ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH ((uint16_t)992 ) 00118 #define ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH ((uint16_t)1984) 00119 #define ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH ((uint16_t)4032) 00120 00121 extern const uint16_t armBitRevIndexTable_fixed_16[ARMBITREVINDEXTABLE_FIXED___16_TABLE_LENGTH]; 00122 extern const uint16_t armBitRevIndexTable_fixed_32[ARMBITREVINDEXTABLE_FIXED___32_TABLE_LENGTH]; 00123 extern const uint16_t armBitRevIndexTable_fixed_64[ARMBITREVINDEXTABLE_FIXED___64_TABLE_LENGTH]; 00124 extern const uint16_t armBitRevIndexTable_fixed_128[ARMBITREVINDEXTABLE_FIXED__128_TABLE_LENGTH]; 00125 extern const uint16_t armBitRevIndexTable_fixed_256[ARMBITREVINDEXTABLE_FIXED__256_TABLE_LENGTH]; 00126 extern const uint16_t armBitRevIndexTable_fixed_512[ARMBITREVINDEXTABLE_FIXED__512_TABLE_LENGTH]; 00127 extern const uint16_t armBitRevIndexTable_fixed_1024[ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH]; 00128 extern const uint16_t armBitRevIndexTable_fixed_2048[ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH]; 00129 extern const uint16_t armBitRevIndexTable_fixed_4096[ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH]; 00130 00131 /* Tables for Fast Math Sine and Cosine */ 00132 extern const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE + 1]; 00133 extern const q31_t sinTable_q31[FAST_MATH_TABLE_SIZE + 1]; 00134 extern const q15_t sinTable_q15[FAST_MATH_TABLE_SIZE + 1]; 00135 00136 #endif /* ARM_COMMON_TABLES_H */
Generated on Tue Jul 12 2022 23:05:48 by
