NMSIS-DSP  Version 1.5.0
NMSIS DSP Software Library

Variables

const uint16_t riscvBitRevTable[1024] RISCV_DSP_TABLE_ATTRIBUTE
 Table for bit reversal process. More...
 
const float16_t twiddleCoefF16_16[32] RISCV_DSP_TABLE_ATTRIBUTE
 Floating-point Twiddle factors Table Generation. More...
 
const uint64_t twiddleCoefF64_16 [32]
 Double Precision Floating-point Twiddle factors Table Generation. More...
 
const uint64_t twiddleCoefF64_32 [64]
 
const uint64_t twiddleCoefF64_64 [128]
 
const uint64_t twiddleCoefF64_128 [256]
 
const uint64_t twiddleCoefF64_256 [512]
 
const uint64_t twiddleCoefF64_512 [1024]
 
const uint64_t twiddleCoefF64_1024 [2048]
 
const uint64_t twiddleCoefF64_2048 [4096]
 
const uint64_t twiddleCoefF64_4096 [8192]
 
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]
 Q31 Twiddle factors Table. More...
 
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]
 q15 Twiddle factors Table More...
 
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 float16_t twiddleCoefF16_32 [64]
 
const float16_t twiddleCoefF16_64 [128]
 
const float16_t twiddleCoefF16_128 [256]
 
const float16_t twiddleCoefF16_256 [512]
 
const float16_t twiddleCoefF16_512 [1024]
 
const float16_t twiddleCoefF16_1024 [2048]
 
const float16_t twiddleCoefF16_2048 [4096]
 
const float16_t twiddleCoefF16_4096 [8192]
 
const float16_t twiddleCoefF16_rfft_32 [32]
 
const float16_t twiddleCoefF16_rfft_64 [64]
 
const float16_t twiddleCoefF16_rfft_128 [128]
 
const float16_t twiddleCoefF16_rfft_256 [256]
 
const float16_t twiddleCoefF16_rfft_512 [512]
 
const float16_t twiddleCoefF16_rfft_1024 [1024]
 
const float16_t twiddleCoefF16_rfft_2048 [2048]
 
const float16_t twiddleCoefF16_rfft_4096 [4096]
 

Detailed Description

Variable Documentation

◆ RISCV_DSP_TABLE_ATTRIBUTE [1/2]

const q15_t sqrt_initial_lut_q15 [16] RISCV_DSP_TABLE_ATTRIBUTE

Table for bit reversal process.

Q31 table for reciprocal.

q15 Twiddle factors Table

Q31 Twiddle factors Table.

Double Precision Floating-point Twiddle factors Table Generation.

Pseudo code for Generation of Bit reversal Table is
for (l = 1; l <= N/4; l++)
{
for (i = 0; i< logN2; i++)
{
a[i] = l & (1 << i);
}
for (j = 0; j < logN2; j++)
{
if (a[j] != 0)
y[l] += (1 << ((logN2 - 1) - j));
}
y[l] = y[l] >> 1;
}
where N = 4096, logN2 = 12
N is the maximum FFT Size supported
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(double)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(double)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/N);
twiddleCoef[2*i+1] = sin(i * 2*PI/N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for(i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Q31 Twiddle factors Generation::
for(i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i < 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))
Example code for q15 Twiddle factors Generation::
fori = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

end of CFFT_CIFFT group

Example code for Double Precision Floating-point RFFT Twiddle factors Generation:
TW = exp(pi/2*i-2*pi*i*[0:L/2-1]/L).'
Real and Imag values are in interleaved fashion
Example code for Floating-point RFFT Twiddle factors Generation:
TW = exp(pi/2*i-2*pi*i*[0:L/2-1]/L).'
Real and Imag values are in interleaved fashion
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));
}
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));
}
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))
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))
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
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);
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);

◆ RISCV_DSP_TABLE_ATTRIBUTE [2/2]

const float16_t twiddleCoefF16_rfft_4096 [4096] RISCV_DSP_TABLE_ATTRIBUTE

Floating-point Twiddle factors Table Generation.

Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 16 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 32 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 64 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 128 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 256 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 512 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 1024 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 2048 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 4096 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion
Example code for Floating-point RFFT Twiddle factors Generation:
TW = exp(pi/2*i-2*pi*i*[0:L/2-1]/L).'
Real and Imag values are in interleaved fashion

◆ twiddleCoef_1024

const float32_t twiddleCoef_1024
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_1024_q15

const q15_t twiddleCoef_1024_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_1024_q31

const q31_t twiddleCoef_1024_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_128

const float32_t twiddleCoef_128
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_128_q15

const q15_t twiddleCoef_128_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_128_q31

const q31_t twiddleCoef_128_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i < 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_16

const float32_t twiddleCoef_16
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_16_q15

const q15_t twiddleCoef_16_q15
extern

q15 Twiddle factors Table

Example code for q15 Twiddle factors Generation::
fori = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_16_q31

const q31_t twiddleCoef_16_q31
extern

Q31 Twiddle factors Table.

Example code for Q31 Twiddle factors Generation::
for(i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_2048

const float32_t twiddleCoef_2048
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_2048_q15

const q15_t twiddleCoef_2048_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_2048_q31

const q31_t twiddleCoef_2048_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_256

const float32_t twiddleCoef_256
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_256_q15

const q15_t twiddleCoef_256_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_256_q31

const q31_t twiddleCoef_256_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_32

const float32_t twiddleCoef_32
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_32_q15

const q15_t twiddleCoef_32_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_32_q31

const q31_t twiddleCoef_32_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_4096

const float32_t twiddleCoef_4096
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_4096_q15

const q15_t twiddleCoef_4096_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_4096_q31

const q31_t twiddleCoef_4096_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_512

const float32_t twiddleCoef_512
extern
Example code for Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_512_q15

const q15_t twiddleCoef_512_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_512_q31

const q31_t twiddleCoef_512_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoef_64

const float32_t twiddleCoef_64
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoef_64_q15

const q15_t twiddleCoef_64_q15
extern
Example code for q15 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to q15(Fixed point 1.15): round(twiddleCoefq15(i) * pow(2, 15))

◆ twiddleCoef_64_q31

const q31_t twiddleCoef_64_q31
extern
Example code for Q31 Twiddle factors Generation::
for (i = 0; i< 3N/4; i++)
{
twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N);
twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are interleaved fashion
Convert Floating point to Q31(Fixed point 1.31): round(twiddleCoefQ31(i) * pow(2, 31))

◆ twiddleCoefF16_1024

const float16_t twiddleCoefF16_1024
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 1024 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_128

const float16_t twiddleCoefF16_128
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 128 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_2048

const float16_t twiddleCoefF16_2048
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 2048 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_256

const float16_t twiddleCoefF16_256
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 256 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_32

const float16_t twiddleCoefF16_32
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 32 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_4096

const float16_t twiddleCoefF16_4096
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 4096 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_512

const float16_t twiddleCoefF16_512
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 512 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_64

const float16_t twiddleCoefF16_64
extern
Example code for Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i]= cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N);
}
where N = 64 and PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF16_rfft_1024

const float16_t twiddleCoefF16_rfft_1024
extern

◆ twiddleCoefF16_rfft_128

const float16_t twiddleCoefF16_rfft_128
extern

◆ twiddleCoefF16_rfft_2048

const float16_t twiddleCoefF16_rfft_2048
extern

◆ twiddleCoefF16_rfft_256

const float16_t twiddleCoefF16_rfft_256
extern

◆ twiddleCoefF16_rfft_32

const float16_t twiddleCoefF16_rfft_32
extern
Example code for Floating-point RFFT Twiddle factors Generation:
TW = exp(pi/2*i-2*pi*i*[0:L/2-1]/L).'
Real and Imag values are in interleaved fashion

◆ twiddleCoefF16_rfft_4096

const float16_t twiddleCoefF16_rfft_4096
extern

◆ twiddleCoefF16_rfft_512

const float16_t twiddleCoefF16_rfft_512
extern

◆ twiddleCoefF16_rfft_64

const float16_t twiddleCoefF16_rfft_64
extern

◆ twiddleCoefF64_1024

const uint64_t twiddleCoefF64_1024
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 1024, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_128

const uint64_t twiddleCoefF64_128
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 128, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_16

const uint64_t twiddleCoefF64_16
extern

Double Precision Floating-point Twiddle factors Table Generation.

Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(double)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(double)N);
}
where N = 16, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_2048

const uint64_t twiddleCoefF64_2048
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 2048, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_256

const uint64_t twiddleCoefF64_256
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for(i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 256, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_32

const uint64_t twiddleCoefF64_32
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/N);
twiddleCoef[2*i+1] = sin(i * 2*PI/N);
}
where N = 32, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_4096

const uint64_t twiddleCoefF64_4096
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 4096, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_512

const uint64_t twiddleCoefF64_512
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for (i = 0; i< N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 512, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion

◆ twiddleCoefF64_64

const uint64_t twiddleCoefF64_64
extern
Example code for Double Precision Floating-point Twiddle factors Generation:
for(i = 0; i < N/; i++)
{
twiddleCoef[2*i] = cos(i * 2*PI/(float)N);
twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N);
}
where N = 64, PI = 3.14159265358979
Cos and Sin values are in interleaved fashion