CSI-DSP  Version 1.0.0
CSI DSP Software Library
Macros | Variables
csky_common_tables.c File Reference

Macros

#define S
 

Variables

const uint16_t cskyBitRevTable [1024]
 
const float32_t twiddleCoef_16 [32]
 
const float32_t twiddleCoef_32 [64]
 
const float32_t twiddleCoef_64 [128]
 
const float32_t twiddleCoef_128 [256]
 
const float32_t twiddleCoef_256 [512]
 
const float32_t twiddleCoef_512 [1024]
 
const float32_t twiddleCoef_1024 [2048]
 
const float32_t twiddleCoef_2048 [4096]
 
const float32_t twiddleCoef_4096 [8192]
 
const q31_t twiddleCoef_16_q31 [24]
 
const q31_t twiddleCoef_32_q31 [48]
 
const q31_t twiddleCoef_64_q31 [96]
 
const q31_t twiddleCoef_128_q31 [192]
 
const q31_t twiddleCoef_256_q31 [384]
 
const q31_t twiddleCoef_512_q31 [768]
 
const q31_t twiddleCoef_1024_q31 [1536]
 
const q31_t twiddleCoef_2048_q31 [3072]
 
const q31_t twiddleCoef_4096_q31 [6144]
 
const q15_t twiddleCoef_16_q15 [24]
 
const q15_t twiddleCoef_32_q15 [48]
 
const q15_t twiddleCoef_64_q15 [96]
 
const q15_t twiddleCoef_128_q15 [192]
 
const q15_t twiddleCoef_256_q15 [384]
 
const q15_t twiddleCoef_512_q15 [768]
 
const q15_t twiddleCoef_1024_q15 [1536]
 
const q15_t twiddleCoef_2048_q15 [3072]
 
const q15_t twiddleCoef_4096_q15 [6144]
 
const q15_t ALIGN4 cskyRecipTableQ15 [64]
 
const q31_t cskyRecipTableQ31 [64]
 
const uint16_t cskyBitRevIndexTable16 [CSKYBITREVINDEXTABLE__16_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable32 [CSKYBITREVINDEXTABLE__32_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable64 [CSKYBITREVINDEXTABLE__64_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable128 [CSKYBITREVINDEXTABLE_128_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable256 [CSKYBITREVINDEXTABLE_256_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable512 [CSKYBITREVINDEXTABLE_512_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable1024 [CSKYBITREVINDEXTABLE1024_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable2048 [CSKYBITREVINDEXTABLE2048_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable4096 [CSKYBITREVINDEXTABLE4096_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_16 [CSKYBITREVINDEXTABLE_FIXED___16_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_32 [CSKYBITREVINDEXTABLE_FIXED___32_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_64 [CSKYBITREVINDEXTABLE_FIXED___64_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_128 [CSKYBITREVINDEXTABLE_FIXED__128_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_256 [CSKYBITREVINDEXTABLE_FIXED__256_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_512 [CSKYBITREVINDEXTABLE_FIXED__512_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_1024 [CSKYBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_2048 [CSKYBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH]
 
const uint16_t cskyBitRevIndexTable_fixed_4096 [CSKYBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH]
 
const float32_t twiddleCoef_rfft_32 [32]
 
const float32_t twiddleCoef_rfft_64 [64]
 
const float32_t twiddleCoef_rfft_128 [128]
 
const float32_t twiddleCoef_rfft_256 [256]
 
const float32_t twiddleCoef_rfft_512 [512]
 
const float32_t twiddleCoef_rfft_1024 [1024]
 
const float32_t twiddleCoef_rfft_2048 [2048]
 
const float32_t twiddleCoef_rfft_4096 [4096]
 
const q15_t ALIGN4 realCoefAQ15_32 [32]
 
const q15_t ALIGN4 realCoefBQ15_32 [32]
 
const q15_t ALIGN4 realCoefAQ15_64 [64]
 
const q15_t ALIGN4 realCoefBQ15_64 [64]
 
const q15_t ALIGN4 realCoefAQ15_128 [128]
 
const q15_t ALIGN4 realCoefBQ15_128 [128]
 
const q15_t ALIGN4 realCoefAQ15_256 [256]
 
const q15_t ALIGN4 realCoefBQ15_256 [256]
 
const q15_t ALIGN4 realCoefAQ15_512 [512]
 
const q15_t ALIGN4 realCoefBQ15_512 [512]
 
const q15_t ALIGN4 realCoefAQ15_1024 [1024]
 
const q15_t ALIGN4 realCoefBQ15_1024 [1024]
 
const q15_t ALIGN4 realCoefAQ15_2048 [2048]
 
const q15_t ALIGN4 realCoefBQ15_2048 [2048]
 
const q15_t ALIGN4 realCoefAQ15_4096 [4096]
 
const q15_t ALIGN4 realCoefBQ15_4096 [4096]
 
const q31_t realCoefAQ31_32 [32]
 
const q31_t realCoefBQ31_32 [32]
 
const q31_t realCoefAQ31_64 [64]
 
const q31_t realCoefBQ31_64 [64]
 
const q31_t realCoefAQ31_128 [128]
 
const q31_t realCoefBQ31_128 [128]
 
const q31_t realCoefAQ31_256 [256]
 
const q31_t realCoefBQ31_256 [256]
 
const q31_t realCoefAQ31_512 [512]
 
const q31_t realCoefBQ31_512 [512]
 
const q31_t realCoefAQ31_1024 [1024]
 
const q31_t realCoefBQ31_1024 [1024]
 
const q31_t realCoefAQ31_2048 [2048]
 
const q31_t realCoefBQ31_2048 [2048]
 
const q31_t realCoefAQ31_4096 [4096]
 
const q31_t realCoefBQ31_4096 [4096]
 
const q15_t ALIGN4 realCoefAQ15 [512]
 
const q15_t ALIGN4 realCoefBQ15 [512]
 
const q31_t realCoefAQ31 [512]
 
const q31_t realCoefBQ31 [512]
 
const float32_t realCoefA [512]
 
const float32_t realCoefB [512]
 
const float32_t sinTable_f32 [FAST_MATH_TABLE_SIZE+1]
 
const q31_t sinTable_q31 [FAST_MATH_TABLE_SIZE+1]
 
const q15_t sinTable_q15 [FAST_MATH_TABLE_SIZE+1]
 
const log2_cof1 ui
 
const log2_cof2 vj
 
const exp_cof1 coar
 
const exp_cof2 fine
 
const float64_t exp2_accuratetable [512]
 
const float32_t exp2_deltatable [512]
 
const mynumber Iu [182]
 
const mynumber Iv [362]
 
const mynumber Lu [182][2]
 
const mynumber Lv [362][2]
 

Macro Definition Documentation

#define S

Variable Documentation

const exp_cof1 coar
const uint16_t cskyBitRevIndexTable1024[CSKYBITREVINDEXTABLE1024_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable128[CSKYBITREVINDEXTABLE_128_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable16[CSKYBITREVINDEXTABLE__16_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable2048[CSKYBITREVINDEXTABLE2048_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable256[CSKYBITREVINDEXTABLE_256_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable32[CSKYBITREVINDEXTABLE__32_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable4096[CSKYBITREVINDEXTABLE4096_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable512[CSKYBITREVINDEXTABLE_512_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable64[CSKYBITREVINDEXTABLE__64_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_1024[CSKYBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_128[CSKYBITREVINDEXTABLE_FIXED__128_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_16[CSKYBITREVINDEXTABLE_FIXED___16_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_2048[CSKYBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_256[CSKYBITREVINDEXTABLE_FIXED__256_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_32[CSKYBITREVINDEXTABLE_FIXED___32_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_4096[CSKYBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_512[CSKYBITREVINDEXTABLE_FIXED__512_TABLE_LENGTH]
const uint16_t cskyBitRevIndexTable_fixed_64[CSKYBITREVINDEXTABLE_FIXED___64_TABLE_LENGTH]
const q15_t ALIGN4 cskyRecipTableQ15[64]

end of CFFT_CIFFT group

const q31_t cskyRecipTableQ31[64]
const float64_t exp2_accuratetable[512]
const float32_t exp2_deltatable[512]
const exp_cof2 fine
const mynumber Iu[182]
const mynumber Iv[362]
const mynumber Lu[182][2]
const mynumber Lv[362][2]
const float32_t realCoefA[512]
Generation of realCoefA array:
n = 4096
for (i = 0; i < n; i++)
 {
   pATable[2 * i] = 0.5 * (1.0 - sin (2 * PI / (double) (2 * n) * (double) i));
   pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i));
 } 
const q15_t ALIGN4 realCoefAQ15[512]
Generation fixed-point realCoefAQ15 array in Q15 format:
n = 4096
for (i = 0; i < n; i++)
 {
   pATable[2 * i] = 0.5 * (1.0 - sin (2 * PI / (double) (2 * n) * (double) i));
   pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i));
 } 
Convert to fixed point Q15 format round(pATable[i] * pow(2, 15))
const q15_t ALIGN4 realCoefAQ15_1024[1024]
const q15_t ALIGN4 realCoefAQ15_128[128]
const q15_t ALIGN4 realCoefAQ15_2048[2048]
const q15_t ALIGN4 realCoefAQ15_256[256]
const q15_t ALIGN4 realCoefAQ15_32[32]
const q15_t ALIGN4 realCoefAQ15_4096[4096]
const q15_t ALIGN4 realCoefAQ15_512[512]
const q15_t ALIGN4 realCoefAQ15_64[64]
const q31_t realCoefAQ31[512]
Generation fixed-point realCoefAQ31 array in Q31 format:
n = 4096
for (i = 0; i < n; i++)
{
   pATable[2 * i] = 0.5 * (1.0 - sin (2 * PI / (double) (2 * n) * (double) i));
   pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i));
}
Convert to fixed point Q31 format round(pATable[i] * pow(2, 31))
const q31_t realCoefAQ31_1024[1024]
const q31_t realCoefAQ31_128[128]
const q31_t realCoefAQ31_2048[2048]
const q31_t realCoefAQ31_256[256]
const q31_t realCoefAQ31_32[32]
const q31_t realCoefAQ31_4096[4096]
const q31_t realCoefAQ31_512[512]
const q31_t realCoefAQ31_64[64]
const float32_t realCoefB[512]
Generation of realCoefB array:
n = 4096
for (i = 0; i < n; i++)
{
   pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i));
   pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i));
 } 
const q15_t ALIGN4 realCoefBQ15[512]
Generation of real_CoefB array:
n = 4096
for (i = 0; i < n; i++)
 {
   pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i));
   pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i));
 } 
Convert to fixed point Q15 format round(pBTable[i] * pow(2, 15))
const q15_t ALIGN4 realCoefBQ15_1024[1024]
const q15_t ALIGN4 realCoefBQ15_128[128]
const q15_t ALIGN4 realCoefBQ15_2048[2048]
const q15_t ALIGN4 realCoefBQ15_256[256]
const q15_t ALIGN4 realCoefBQ15_32[32]
const q15_t ALIGN4 realCoefBQ15_4096[4096]
const q15_t ALIGN4 realCoefBQ15_512[512]
const q15_t ALIGN4 realCoefBQ15_64[64]
const q31_t realCoefBQ31[512]
Generation of realCoefBQ31 array:
n = 4096
for (i = 0; i < n; i++)
{
   pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i));
   pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i));
} 
Convert to fixed point Q31 format round(pBTable[i] * pow(2, 31))
const q31_t realCoefBQ31_1024[1024]
const q31_t realCoefBQ31_128[128]
const q31_t realCoefBQ31_2048[2048]
const q31_t realCoefBQ31_256[256]
const q31_t realCoefBQ31_32[32]
const q31_t realCoefBQ31_4096[4096]
const q31_t realCoefBQ31_512[512]
const q31_t realCoefBQ31_64[64]
const float32_t sinTable_f32[FAST_MATH_TABLE_SIZE+1]
Example code for the generation of the floating-point sine table:
tableSize = 512;
for(n = 0; n < (tableSize + 1); n++)
{
     sinTable[n]=sin(2*pi*n/tableSize);
}
where pi value is 3.14159265358979
const q15_t sinTable_q15[FAST_MATH_TABLE_SIZE+1]
Table values are in Q15 (1.15 fixed-point format) and generation is done in three steps. First, generate sin values in floating point:
tableSize = 512;
for(n = 0; n < (tableSize + 1); n++)
{
     sinTable[n]= sin(2*pi*n/tableSize);
} 
where pi value is 3.14159265358979
Second, convert floating-point to Q15 (Fixed point): (sinTable[i] * pow(2, 15))
Finally, round to the nearest integer value: sinTable[i] += (sinTable[i] > 0 ? 0.5 :-0.5);
const q31_t sinTable_q31[FAST_MATH_TABLE_SIZE+1]
Table values are in Q31 (1.31 fixed-point format) and generation is done in three steps. First, generate sin values in floating point:
tableSize = 512;
for(n = 0; n < (tableSize + 1); n++)
{
     sinTable[n]= sin(2*pi*n/tableSize);
} 
where pi value is 3.14159265358979
Second, convert floating-point to Q31 (Fixed point): (sinTable[i] * pow(2, 31))
Finally, round to the nearest integer value: sinTable[i] += (sinTable[i] > 0 ? 0.5 :-0.5);
const float32_t twiddleCoef_rfft_1024[1024]
const float32_t twiddleCoef_rfft_128[128]
const float32_t twiddleCoef_rfft_2048[2048]
const float32_t twiddleCoef_rfft_256[256]
const float32_t twiddleCoef_rfft_32[32]
Example code for Floating-point RFFT Twiddle factors Generation:
TW = exp(2*pi*i*[0:L/2-1]/L - pi/2*i).' 
Real and Imag values are in interleaved fashion
const float32_t twiddleCoef_rfft_4096[4096]
const float32_t twiddleCoef_rfft_512[512]
const float32_t twiddleCoef_rfft_64[64]
const log2_cof1 ui
const log2_cof2 vj