Add wasm tacle-bench targets

This commit is contained in:
2026-06-12 20:06:22 +02:00
parent 30daa8a00c
commit 08c2e9c13d
1122 changed files with 520422 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# ~~~
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2026, Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)
# ~~~
cmake_minimum_required(VERSION 3.20)
project(fft)
set(TACLEBENCH_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../..")
set(REPOSITORY_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../..")
set(APP_TARGET_NAME "${CMAKE_PROJECT_NAME}")
if(DEFINED TACLEBENCH_VARIANT AND "${TACLEBENCH_VARIANT}" STREQUAL "inline")
set(APP_SOURCE_FILE_PATH
"generated/modified_sources/inline/fft.c")
else()
set(APP_SOURCE_FILE_PATH
"generated/modified_sources/default/fft.c"
"generated/modified_sources/default/fft_input.c")
endif()
include(${REPOSITORY_ROOT_PATH}/cmake/taclebench_wasm.cmake)

View File

@ -0,0 +1,35 @@
File: fft.c
Original provenience: DSP-Stone
2016-01-05:
- Rename fft_1024_13 to fft
- Add generic TACLeBench header
- Remove original header from DSP-Stone group
- Remove duplicate semicolon in bit_reduct
- Introduce fft_init (initialization of input)
and fft_main (main entry point)
- Update comments about separate input-data file
- Add entry-point annotation to fft_main
- Introduce non-zero return value and make input_data global to reduce impact of
compiler optimizations
- Prefix the functions pin_down, float2frac, convert, exp2f and the global
variables input_data, inputfract, input, twidtable with fft_
2016-03-02:
- Fix undefined behavior due to unsequenced modification and access
- Reformat large arrays using clang-format to 80 columns
- Apply code formatting with astyle as in the example
2016-04-25:
- Remove unnecessary braces in fft_bit_reduct
- Add void parameter to fft_float2fract
- Add all forward declarations
- Move input data into separate file
- Compute check sum and compare it to expected value in return function
2016-04-26:
- Remove unnecessary braces in fft_pin_down
- Avoid constant propagation through addition with volatile variable
on each element of fft_input_data, fft_twidtable, and fft_input
- Reorganize functions into logical segments in main source file
- Replace usage of macros by their expanded values:
STORAGE_CLASS => register, TYPE => int
2017-07-10:
- Fix loop bounds to avoid buffer overflow.

View File

@ -0,0 +1,333 @@
/*
This program is part of the TACLeBench benchmark suite.
Version V 2.0
Name: fft
Author: Juan Martinez Velarde
Function: benchmarking of an integer stage scaling FFT
To avoid errors caused by overflow and bit growth,
the input data is scaled. Bit growth occurs potentially
at butterfly operations, which involve a complex
multiplication, a complex addition and a complex
subtraction. Maximal bit growth from butterfly input
to butterfly output is two bits.
The input data includes enough extra sign bits, called
guard bits, to ensure that bit growth never results in
overflow (Rabiner and Gold, 1975). Data can grow by a
maximum factor of 2.4 from butterfly input to output
(two bits of grow). However, a data value cannot grow by
maximum amount in two consecutive stages.
The number of guard bits necessary to compensate the
maximum bit growth in an N-point FFT is (log_2 (N))+1).
In a 16-point FFT (requires 4 stages), each of the
input samples should contain 5 guard bits. The input
data is then restricted to 10 bits, one sign bit and
nine magnitude bits, in order to prevent an
overflow from the integer multiplication with the
precalculed twiddle coefficients.
Another method to compensate bit growth is to scale the
outputs down by a factor of two unconditionally after
each stage. This approach is called unconditional scaling
Initially, 2 guard bits are included in the input data to
accomodate the maximum overflow in the first stage.
In each butterfly of a stage calculation, the data can
grow into the guard bits. To prevent overflow in the next
stage, the guard bits are replaced before the next stage is
executed by shifting the entire block of data one bit
to the right.
Input data should not be restricted to a 1.9 format.
Input data can be represented in a 1.13 format,that is
14 significant bits, one sign and 13 magnitude bits. In
the FFT calculation, the data loses a total of (log2 N) -1
bits because of shifting. Unconditional scaling results
in the same number of bits lost as in the input data scaling.
However, it produces more precise results because the
FFT starts with more precise input data. The tradeoff is
a slower FFT calculation because of the extra cycles needed
to shift the output of each stage.
Source: DSP-Stone
http://www.ice.rwth-aachen.de/research/tools-projects/entry/detail/dspstone/
Original name: fft_1024_13
(merged main1024_bit_reduct and fft_bit_reduct from DSP-Stone)
Changes: no major functional changes
License: may be used, modified, and re-distributed freely
*/
#define N_FFT 1024
#define NUMBER_OF_BITS 13 /* fract format 1.NUMBER_OF_BITS = 1.13 */
#define BITS_PER_TWID 13 /* bits per twiddle coefficient */
#define SHIFT BITS_PER_TWID /* fractional shift after each multiplication */
/*
Forward declaration of functions
*/
float fft_exp2f( float x );
float fft_modff( float x, float *intpart );
int fft_convert( float value );
void fft_bit_reduct( register int *int_pointer );
void fft_pin_down( int input_data[ ] );
void fft_init( void );
void fft_main( void );
int fft_return( void );
int main( void );
/*
Forward declaration of global variables
*/
int fft_input_data[ 2 * N_FFT ];
/* precalculated twiddle factors
for an integer 1024 point FFT
in format 1.13 => table twidtable[ 2*(N_FFT-1) ] ; */
extern int fft_twidtable[ 2046 ];
/* 1024 real values as input data in float format */
extern float fft_input[ 1024 ];
/* will hold the transformed data */
int fft_inputfract[ N_FFT ];
/*
Algorithm core function
*/
void fft_bit_reduct( register int *int_pointer )
{
register int i, j = 0 ;
register int tmpr, max = 2, m, n = N_FFT << 1 ;
/* do the bit reversal scramble of the input data */
_Pragma( "loopbound min 1024 max 1024" )
for ( i = 0; i < ( n - 1 ) ; i += 2 ) {
if ( j > i ) {
tmpr = *( int_pointer + j ) ;
*( int_pointer + j ) = *( int_pointer + i ) ;
*( int_pointer + i ) = tmpr ;
tmpr = *( int_pointer + j + 1 ) ;
*( int_pointer + j + 1 ) = *( int_pointer + i + 1 ) ;
*( int_pointer + i + 1 ) = tmpr ;
}
m = N_FFT;
_Pragma( "loopbound min 0 max 10" )
while ( m >= 2 && j >= m ) {
j -= m ;
m >>= 1;
}
j += m ;
}
{
register int *data_pointer = &fft_twidtable[ 0 ] ;
register int *p, *q ;
register int tmpi, fr = 0, level, k, l ;
_Pragma( "loopbound min 10 max 10" )
while ( n > max ) {
level = max << 1;
_Pragma( "loopbound min 1 max 512" )
for ( m = 1; m < max; m += 2 ) {
l = *( data_pointer + fr );
k = *( data_pointer + fr + 1 ) ;
fr += 2 ;
_Pragma( "loopbound min 1 max 512" )
for ( i = m; i <= n; i += level ) {
j = i + max;
p = int_pointer + j;
q = int_pointer + i;
tmpr = l * *( p - 1 );
tmpr -= ( k * *p );
tmpi = l * *p;
tmpi += ( k * *( p - 1 ) );
tmpr = tmpr >> SHIFT ;
tmpi = tmpi >> SHIFT ;
*( p - 1 ) = *( q - 1 ) - tmpr ;
*p = *q - tmpi ;
*( q - 1 ) += tmpr ;
*q += tmpi ;
}
}
/* implement unconditional bit reduction */
{
register int f;
p = int_pointer;
_Pragma( "loopbound min 2048 max 2048" )
for ( f = 0 ; f < 2 * N_FFT; f++ ) {
*p = *p >> 1;
p++;
}
}
max = level;
}
}
}
/*
Initialization- and return-value-related functions
*/
/* conversion function to 1.NUMBER_OF_BITS format */
float fft_exp2f( float x )
{
int i;
float ret = 2.0f;
_Pragma( "loopbound min 13 max 13" )
for ( i = 1; i < x; ++i )
ret *= 2.0f;
return ret;
}
float fft_modff( float x, float *intpart )
{
if ( intpart ) {
*intpart = ( int )x;
return x - *intpart;
} else
return x;
}
/* conversion function to 1.NUMBER_OF_BITS format */
int fft_convert( float value )
{
float man, t_val, frac, m, exponent = NUMBER_OF_BITS;
int rnd_val;
unsigned long int_val;
unsigned long pm_val;
m = fft_exp2f( exponent + 1 ) - 1;
t_val = value * m ;
frac = fft_modff( t_val, &man );
if ( frac < 0.0f ) {
rnd_val = ( -1 );
if ( frac > -0.5f ) rnd_val = 0;
} else {
rnd_val = 1;
if ( frac < 0.5f ) rnd_val = 0;
}
int_val = (long)man + (long)rnd_val;
pm_val = int_val ;
return ( ( int ) ( pm_val ) ) ;
}
void fft_float2fract( void )
{
float f ;
int j, i ;
_Pragma( "loopbound min 1024 max 1024" )
for ( j = 0 ; j < N_FFT ; j++ ) {
f = fft_input[ j ];
i = fft_convert( f );
fft_inputfract[ j ] = i;
}
}
void fft_pin_down( int input_data[ ] )
{
/* conversion from input to a 1.13 format */
fft_float2fract() ;
int *pd, *ps, f;
pd = &input_data[ 0 ];
ps = &fft_inputfract[ 0 ];
_Pragma( "loopbound min 1024 max 1024" )
for ( f = 0; f < N_FFT; f++ ) {
*pd++ = *ps++ ; /* fill in with real data */
*pd++ = 0 ; /* imaginary data is equal zero */
}
}
void fft_init( void )
{
int i;
volatile int x = 0;
fft_pin_down( &fft_input_data[ 0 ] );
/* avoid constant propagation of input values */
_Pragma( "loopbound min 2046 max 2046" )
for ( i = 0; i < 2 * ( N_FFT - 1 ); i++ ) {
fft_input_data[ i ] += x;
fft_twidtable[ i ] += x;
}
_Pragma( "loopbound min 2 max 2" )
for ( ; i < 2 * N_FFT; i++ )
fft_input_data[ i ] += x;
}
int fft_return( void )
{
int check_sum = 0;
int i = 0;
_Pragma( "loopbound min 2048 max 2048" )
for ( i = 0; i < 2 * N_FFT; ++i )
check_sum += fft_input_data[ i ];
return check_sum != 3968;
}
/*
Main functions
*/
void _Pragma( "entrypoint" ) fft_main( void )
{
fft_bit_reduct( &fft_input_data[ 0 ] );
}
int main( void )
{
fft_init();
fft_main();
return fft_return();
}

View File

@ -0,0 +1,322 @@
int fft_twidtable[ 2046 ] = {
8192, 0, 8192, 0, 0, -8192, 8192, 0, 5792, -5792, 0,
-8191, -5792, -5792, 8192, 0, 7568, -3134, 5792, -5792, 3134, -7568,
0, -8192, -3134, -7568, -5792, -5792, -7568, -3134, 8192, 0, 8034,
-1598, 7568, -3134, 6811, -4551, 5792, -5792, 4551, -6811, 3134, -7568,
1598, -8034, 0, -8192, -1598, -8034, -3134, -7568, -4551, -6811, -5792,
-5792, -6811, -4551, -7568, -3134, -8034, -1598, 8192, 0, 8152, -802,
8034, -1598, 7839, -2378, 7568, -3134, 7224, -3861, 6811, -4551, 6332,
-5196, 5792, -5792, 5196, -6332, 4551, -6811, 3861, -7224, 3134, -7568,
2378, -7839, 1598, -8034, 802, -8152, 0, -8191, -802, -8152, -1598,
-8034, -2378, -7839, -3134, -7568, -3861, -7224, -4551, -6811, -5196, -6332,
-5792, -5792, -6332, -5196, -6811, -4551, -7224, -3861, -7568, -3134, -7839,
-2378, -8034, -1598, -8152, -802, 8192, 0, 8182, -401, 8152, -802,
8103, -1202, 8034, -1598, 7946, -1990, 7839, -2378, 7713, -2759, 7568,
-3134, 7405, -3502, 7224, -3861, 7026, -4211, 6811, -4551, 6579, -4879,
6332, -5196, 6069, -5501, 5792, -5792, 5501, -6069, 5196, -6332, 4879,
-6579, 4551, -6811, 4211, -7026, 3861, -7224, 3502, -7405, 3134, -7568,
2759, -7713, 2378, -7839, 1990, -7946, 1598, -8034, 1202, -8103, 802,
-8152, 401, -8182, 0, -8192, -401, -8182, -802, -8152, -1202, -8103,
-1598, -8034, -1990, -7946, -2378, -7839, -2759, -7713, -3134, -7568, -3502,
-7405, -3861, -7224, -4211, -7026, -4551, -6811, -4879, -6579, -5196, -6332,
-5501, -6069, -5792, -5792, -6069, -5501, -6332, -5196, -6579, -4879, -6811,
-4551, -7026, -4211, -7224, -3861, -7405, -3502, -7568, -3134, -7713, -2759,
-7839, -2378, -7946, -1990, -8034, -1598, -8103, -1202, -8152, -802, -8182,
-401, 8192, 0, 8189, -201, 8182, -401, 8169, -602, 8152, -802,
8130, -1002, 8103, -1202, 8071, -1400, 8034, -1598, 7992, -1794, 7946,
-1990, 7895, -2184, 7839, -2378, 7778, -2569, 7713, -2759, 7643, -2948,
7568, -3134, 7489, -3319, 7405, -3502, 7317, -3683, 7224, -3861, 7127,
-4037, 7026, -4211, 6921, -4382, 6811, -4551, 6697, -4717, 6579, -4879,
6458, -5039, 6332, -5196, 6203, -5350, 6069, -5501, 5933, -5648, 5792,
-5792, 5648, -5933, 5501, -6069, 5350, -6203, 5196, -6332, 5039, -6458,
4879, -6579, 4717, -6697, 4551, -6811, 4382, -6921, 4211, -7026, 4037,
-7127, 3861, -7224, 3683, -7317, 3502, -7405, 3319, -7489, 3134, -7568,
2948, -7643, 2759, -7713, 2569, -7778, 2378, -7839, 2184, -7895, 1990,
-7946, 1794, -7992, 1598, -8034, 1400, -8071, 1202, -8103, 1002, -8130,
802, -8152, 602, -8169, 401, -8182, 201, -8189, 0, -8192, -201,
-8189, -401, -8182, -602, -8169, -802, -8152, -1002, -8130, -1202, -8103,
-1400, -8071, -1598, -8034, -1794, -7992, -1990, -7946, -2184, -7895, -2378,
-7839, -2569, -7778, -2759, -7713, -2948, -7643, -3134, -7568, -3319, -7489,
-3502, -7405, -3683, -7317, -3861, -7224, -4037, -7127, -4211, -7026, -4382,
-6921, -4551, -6811, -4717, -6697, -4879, -6579, -5039, -6458, -5196, -6332,
-5350, -6203, -5501, -6069, -5648, -5933, -5792, -5792, -5933, -5648, -6069,
-5501, -6203, -5350, -6332, -5196, -6458, -5039, -6579, -4879, -6697, -4717,
-6811, -4551, -6921, -4382, -7026, -4211, -7127, -4037, -7224, -3861, -7317,
-3683, -7405, -3502, -7489, -3319, -7568, -3134, -7643, -2948, -7713, -2759,
-7778, -2569, -7839, -2378, -7895, -2184, -7946, -1990, -7992, -1794, -8034,
-1598, -8071, -1400, -8103, -1202, -8130, -1002, -8152, -802, -8169, -602,
-8182, -401, -8189, -201, 8192, 0, 8191, -100, 8189, -201, 8186,
-301, 8182, -401, 8176, -502, 8169, -602, 8161, -702, 8152, -802,
8142, -902, 8130, -1002, 8117, -1102, 8103, -1202, 8087, -1301, 8071,
-1400, 8053, -1499, 8034, -1598, 8014, -1696, 7992, -1794, 7970, -1892,
7946, -1990, 7921, -2087, 7895, -2184, 7867, -2281, 7839, -2378, 7809,
-2474, 7778, -2569, 7746, -2664, 7713, -2759, 7678, -2854, 7643, -2948,
7606, -3041, 7568, -3134, 7529, -3227, 7489, -3319, 7447, -3411, 7405,
-3502, 7361, -3593, 7317, -3683, 7271, -3772, 7224, -3861, 7176, -3950,
7127, -4037, 7077, -4124, 7026, -4211, 6974, -4297, 6921, -4382, 6866,
-4467, 6811, -4551, 6755, -4634, 6697, -4717, 6639, -4798, 6579, -4879,
6519, -4960, 6458, -5039, 6395, -5118, 6332, -5196, 6268, -5274, 6203,
-5350, 6136, -5426, 6069, -5501, 6001, -5575, 5933, -5648, 5863, -5721,
5792, -5792, 5721, -5863, 5648, -5933, 5575, -6001, 5501, -6069, 5426,
-6136, 5350, -6203, 5274, -6268, 5196, -6332, 5118, -6395, 5039, -6458,
4960, -6519, 4879, -6579, 4798, -6639, 4717, -6697, 4634, -6755, 4551,
-6811, 4467, -6866, 4382, -6921, 4297, -6974, 4211, -7026, 4124, -7077,
4037, -7127, 3950, -7176, 3861, -7224, 3772, -7271, 3683, -7317, 3593,
-7361, 3502, -7405, 3411, -7447, 3319, -7489, 3227, -7529, 3134, -7568,
3041, -7606, 2948, -7643, 2854, -7678, 2759, -7713, 2664, -7746, 2569,
-7778, 2474, -7809, 2378, -7839, 2281, -7867, 2184, -7895, 2087, -7921,
1990, -7946, 1892, -7970, 1794, -7992, 1696, -8014, 1598, -8034, 1499,
-8053, 1400, -8071, 1301, -8087, 1202, -8103, 1102, -8117, 1002, -8130,
902, -8142, 802, -8152, 702, -8161, 602, -8169, 502, -8176, 401,
-8182, 301, -8186, 201, -8189, 100, -8191, 0, -8192, -100, -8191,
-201, -8189, -301, -8186, -401, -8182, -502, -8176, -602, -8169, -702,
-8161, -802, -8152, -902, -8142, -1002, -8130, -1102, -8117, -1202, -8103,
-1301, -8087, -1400, -8071, -1499, -8053, -1598, -8034, -1696, -8014, -1794,
-7992, -1892, -7970, -1990, -7946, -2087, -7921, -2184, -7895, -2281, -7867,
-2378, -7839, -2474, -7809, -2569, -7778, -2664, -7746, -2759, -7713, -2854,
-7678, -2948, -7643, -3041, -7606, -3134, -7568, -3227, -7529, -3319, -7489,
-3411, -7447, -3502, -7405, -3593, -7361, -3683, -7317, -3772, -7271, -3861,
-7224, -3950, -7176, -4037, -7127, -4124, -7077, -4211, -7026, -4297, -6974,
-4382, -6921, -4467, -6866, -4551, -6811, -4634, -6755, -4717, -6697, -4798,
-6639, -4879, -6579, -4960, -6519, -5039, -6458, -5118, -6395, -5196, -6332,
-5274, -6268, -5350, -6203, -5426, -6136, -5501, -6069, -5575, -6001, -5648,
-5933, -5721, -5863, -5792, -5792, -5863, -5721, -5933, -5648, -6001, -5575,
-6069, -5501, -6136, -5426, -6203, -5350, -6268, -5274, -6332, -5196, -6395,
-5118, -6458, -5039, -6519, -4960, -6579, -4879, -6639, -4798, -6697, -4717,
-6755, -4634, -6811, -4551, -6866, -4467, -6921, -4382, -6974, -4297, -7026,
-4211, -7077, -4124, -7127, -4037, -7176, -3950, -7224, -3861, -7271, -3772,
-7317, -3683, -7361, -3593, -7405, -3502, -7447, -3411, -7489, -3319, -7529,
-3227, -7568, -3134, -7606, -3041, -7643, -2948, -7678, -2854, -7713, -2759,
-7746, -2664, -7778, -2569, -7809, -2474, -7839, -2378, -7867, -2281, -7895,
-2184, -7921, -2087, -7946, -1990, -7970, -1892, -7992, -1794, -8014, -1696,
-8034, -1598, -8053, -1499, -8071, -1400, -8087, -1301, -8103, -1202, -8117,
-1102, -8130, -1002, -8142, -902, -8152, -802, -8161, -702, -8169, -602,
-8176, -502, -8182, -401, -8186, -301, -8189, -201, -8191, -100, 8192,
0, 8191, -50, 8191, -100, 8190, -150, 8189, -201, 8188, -251,
8186, -301, 8184, -351, 8182, -401, 8179, -452, 8176, -502, 8173,
-552, 8169, -602, 8165, -652, 8161, -702, 8157, -752, 8152, -802,
8147, -852, 8142, -902, 8136, -952, 8130, -1002, 8124, -1052, 8117,
-1102, 8110, -1152, 8103, -1202, 8095, -1251, 8087, -1301, 8079, -1350,
8071, -1400, 8062, -1450, 8053, -1499, 8044, -1548, 8034, -1598, 8024,
-1647, 8014, -1696, 8003, -1745, 7992, -1794, 7981, -1843, 7970, -1892,
7958, -1941, 7946, -1990, 7934, -2039, 7921, -2087, 7908, -2136, 7895,
-2184, 7881, -2233, 7867, -2281, 7853, -2329, 7839, -2378, 7824, -2426,
7809, -2474, 7794, -2521, 7778, -2569, 7762, -2617, 7746, -2664, 7729,
-2712, 7713, -2759, 7696, -2807, 7678, -2854, 7661, -2901, 7643, -2948,
7624, -2995, 7606, -3041, 7587, -3088, 7568, -3134, 7549, -3181, 7529,
-3227, 7509, -3273, 7489, -3319, 7468, -3365, 7447, -3411, 7426, -3457,
7405, -3502, 7383, -3547, 7361, -3593, 7339, -3638, 7317, -3683, 7294,
-3728, 7271, -3772, 7248, -3817, 7224, -3861, 7200, -3905, 7176, -3950,
7152, -3994, 7127, -4037, 7102, -4081, 7077, -4124, 7052, -4168, 7026,
-4211, 7000, -4254, 6974, -4297, 6947, -4340, 6921, -4382, 6894, -4425,
6866, -4467, 6839, -4509, 6811, -4551, 6783, -4592, 6755, -4634, 6726,
-4675, 6697, -4717, 6668, -4758, 6639, -4798, 6609, -4839, 6579, -4879,
6549, -4920, 6519, -4960, 6488, -5000, 6458, -5039, 6427, -5079, 6395,
-5118, 6364, -5157, 6332, -5196, 6300, -5235, 6268, -5274, 6235, -5312,
6203, -5350, 6170, -5388, 6136, -5426, 6103, -5464, 6069, -5501, 6036,
-5538, 6001, -5575, 5967, -5612, 5933, -5648, 5898, -5685, 5863, -5721,
5828, -5756, 5792, -5792, 5756, -5828, 5721, -5863, 5685, -5898, 5648,
-5933, 5612, -5967, 5575, -6001, 5538, -6036, 5501, -6069, 5464, -6103,
5426, -6136, 5388, -6170, 5350, -6203, 5312, -6235, 5274, -6268, 5235,
-6300, 5196, -6332, 5157, -6364, 5118, -6395, 5079, -6427, 5039, -6458,
5000, -6488, 4960, -6519, 4920, -6549, 4879, -6579, 4839, -6609, 4798,
-6639, 4758, -6668, 4717, -6697, 4675, -6726, 4634, -6755, 4592, -6783,
4551, -6811, 4509, -6839, 4467, -6866, 4425, -6894, 4382, -6921, 4340,
-6947, 4297, -6974, 4254, -7000, 4211, -7026, 4168, -7052, 4124, -7077,
4081, -7102, 4037, -7127, 3994, -7152, 3950, -7176, 3905, -7200, 3861,
-7224, 3817, -7248, 3772, -7271, 3728, -7294, 3683, -7317, 3638, -7339,
3593, -7361, 3547, -7383, 3502, -7405, 3457, -7426, 3411, -7447, 3365,
-7468, 3319, -7489, 3273, -7509, 3227, -7529, 3181, -7549, 3134, -7568,
3088, -7587, 3041, -7606, 2995, -7624, 2948, -7643, 2901, -7661, 2854,
-7678, 2807, -7696, 2759, -7713, 2712, -7729, 2664, -7746, 2617, -7762,
2569, -7778, 2521, -7794, 2474, -7809, 2426, -7824, 2378, -7839, 2329,
-7853, 2281, -7867, 2233, -7881, 2184, -7895, 2136, -7908, 2087, -7921,
2039, -7934, 1990, -7946, 1941, -7958, 1892, -7970, 1843, -7981, 1794,
-7992, 1745, -8003, 1696, -8014, 1647, -8024, 1598, -8034, 1548, -8044,
1499, -8053, 1450, -8062, 1400, -8071, 1350, -8079, 1301, -8087, 1251,
-8095, 1202, -8103, 1152, -8110, 1102, -8117, 1052, -8124, 1002, -8130,
952, -8136, 902, -8142, 852, -8147, 802, -8152, 752, -8157, 702,
-8161, 652, -8165, 602, -8169, 552, -8173, 502, -8176, 452, -8179,
401, -8182, 351, -8184, 301, -8186, 251, -8188, 201, -8189, 150,
-8190, 100, -8191, 50, -8191, 0, -8191, -50, -8191, -100, -8191,
-150, -8190, -201, -8189, -251, -8188, -301, -8186, -351, -8184, -401,
-8182, -452, -8179, -502, -8176, -552, -8173, -602, -8169, -652, -8165,
-702, -8161, -752, -8157, -802, -8152, -852, -8147, -902, -8142, -952,
-8136, -1002, -8130, -1052, -8124, -1102, -8117, -1152, -8110, -1202, -8103,
-1251, -8095, -1301, -8087, -1350, -8079, -1400, -8071, -1450, -8062, -1499,
-8053, -1548, -8044, -1598, -8034, -1647, -8024, -1696, -8014, -1745, -8003,
-1794, -7992, -1843, -7981, -1892, -7970, -1941, -7958, -1990, -7946, -2039,
-7934, -2087, -7921, -2136, -7908, -2184, -7895, -2233, -7881, -2281, -7867,
-2329, -7853, -2378, -7839, -2426, -7824, -2474, -7809, -2521, -7794, -2569,
-7778, -2617, -7762, -2664, -7746, -2712, -7729, -2759, -7713, -2807, -7696,
-2854, -7678, -2901, -7661, -2948, -7643, -2995, -7624, -3041, -7606, -3088,
-7587, -3134, -7568, -3181, -7549, -3227, -7529, -3273, -7509, -3319, -7489,
-3365, -7468, -3411, -7447, -3457, -7426, -3502, -7405, -3547, -7383, -3593,
-7361, -3638, -7339, -3683, -7317, -3728, -7294, -3772, -7271, -3817, -7248,
-3861, -7224, -3905, -7200, -3950, -7176, -3994, -7152, -4037, -7127, -4081,
-7102, -4124, -7077, -4168, -7052, -4211, -7026, -4254, -7000, -4297, -6974,
-4340, -6947, -4382, -6921, -4425, -6894, -4467, -6866, -4509, -6839, -4551,
-6811, -4592, -6783, -4634, -6755, -4675, -6726, -4717, -6697, -4758, -6668,
-4798, -6639, -4839, -6609, -4879, -6579, -4920, -6549, -4960, -6519, -5000,
-6488, -5039, -6458, -5079, -6427, -5118, -6395, -5157, -6364, -5196, -6332,
-5235, -6300, -5274, -6268, -5312, -6235, -5350, -6203, -5388, -6170, -5426,
-6136, -5464, -6103, -5501, -6069, -5538, -6035, -5575, -6001, -5612, -5967,
-5648, -5933, -5685, -5898, -5721, -5863, -5756, -5828, -5792, -5792, -5828,
-5756, -5863, -5721, -5898, -5685, -5933, -5648, -5967, -5612, -6001, -5575,
-6036, -5538, -6069, -5501, -6103, -5464, -6136, -5426, -6170, -5388, -6203,
-5350, -6235, -5312, -6268, -5274, -6300, -5235, -6332, -5196, -6364, -5157,
-6395, -5118, -6427, -5079, -6458, -5039, -6488, -5000, -6519, -4960, -6549,
-4920, -6579, -4879, -6609, -4839, -6639, -4798, -6668, -4758, -6697, -4717,
-6726, -4675, -6755, -4634, -6783, -4592, -6811, -4551, -6839, -4509, -6866,
-4467, -6894, -4425, -6921, -4382, -6947, -4340, -6974, -4297, -7000, -4254,
-7026, -4211, -7052, -4168, -7077, -4124, -7102, -4081, -7127, -4037, -7152,
-3994, -7176, -3950, -7200, -3905, -7224, -3861, -7248, -3817, -7271, -3772,
-7294, -3728, -7317, -3683, -7339, -3638, -7361, -3593, -7383, -3547, -7405,
-3502, -7426, -3457, -7447, -3411, -7468, -3365, -7489, -3319, -7509, -3273,
-7529, -3227, -7549, -3181, -7568, -3134, -7587, -3088, -7606, -3041, -7624,
-2995, -7643, -2948, -7661, -2901, -7678, -2854, -7696, -2807, -7713, -2759,
-7729, -2712, -7746, -2664, -7762, -2617, -7778, -2569, -7794, -2521, -7809,
-2474, -7824, -2426, -7839, -2378, -7853, -2329, -7867, -2281, -7881, -2233,
-7895, -2184, -7908, -2136, -7921, -2087, -7934, -2039, -7946, -1990, -7958,
-1941, -7970, -1892, -7981, -1843, -7992, -1794, -8003, -1745, -8014, -1696,
-8024, -1647, -8034, -1598, -8044, -1548, -8053, -1499, -8062, -1450, -8071,
-1400, -8079, -1350, -8087, -1301, -8095, -1251, -8103, -1202, -8110, -1152,
-8117, -1102, -8124, -1052, -8130, -1002, -8136, -952, -8142, -902, -8147,
-852, -8152, -802, -8157, -752, -8161, -702, -8165, -652, -8169, -602,
-8173, -552, -8176, -502, -8179, -452, -8182, -401, -8184, -351, -8186,
-301, -8188, -251, -8189, -201, -8190, -150, -8191, -100, -8191, -50
};
/* 1024 real values as input data in float format */
float fft_input[ 1024 ] = {
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f
};

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,330 @@
/*
This program is part of the TACLeBench benchmark suite.
Version V 2.0
Name: fft
Author: Juan Martinez Velarde
Function: benchmarking of an integer stage scaling FFT
To avoid errors caused by overflow and bit growth,
the input data is scaled. Bit growth occurs potentially
at butterfly operations, which involve a complex
multiplication, a complex addition and a complex
subtraction. Maximal bit growth from butterfly input
to butterfly output is two bits.
The input data includes enough extra sign bits, called
guard bits, to ensure that bit growth never results in
overflow (Rabiner and Gold, 1975). Data can grow by a
maximum factor of 2.4 from butterfly input to output
(two bits of grow). However, a data value cannot grow by
maximum amount in two consecutive stages.
The number of guard bits necessary to compensate the
maximum bit growth in an N-point FFT is (log_2 (N))+1).
In a 16-point FFT (requires 4 stages), each of the
input samples should contain 5 guard bits. The input
data is then restricted to 10 bits, one sign bit and
nine magnitude bits, in order to prevent an
overflow from the integer multiplication with the
precalculed twiddle coefficients.
Another method to compensate bit growth is to scale the
outputs down by a factor of two unconditionally after
each stage. This approach is called unconditional scaling
Initially, 2 guard bits are included in the input data to
accomodate the maximum overflow in the first stage.
In each butterfly of a stage calculation, the data can
grow into the guard bits. To prevent overflow in the next
stage, the guard bits are replaced before the next stage is
executed by shifting the entire block of data one bit
to the right.
Input data should not be restricted to a 1.9 format.
Input data can be represented in a 1.13 format,that is
14 significant bits, one sign and 13 magnitude bits. In
the FFT calculation, the data loses a total of (log2 N) -1
bits because of shifting. Unconditional scaling results
in the same number of bits lost as in the input data scaling.
However, it produces more precise results because the
FFT starts with more precise input data. The tradeoff is
a slower FFT calculation because of the extra cycles needed
to shift the output of each stage.
Source: DSP-Stone
http://www.ice.rwth-aachen.de/research/tools-projects/entry/detail/dspstone/
Original name: fft_1024_13
(merged main1024_bit_reduct and fft_bit_reduct from DSP-Stone)
Changes: no major functional changes
License: may be used, modified, and re-distributed freely
*/
// Wasm loop bounds
__attribute__((import_module("__pragma"), import_name("loopbound"))) extern void
__pragma_loopbound(unsigned int min_bound, unsigned int max_bound);
#define N_FFT 1024
#define NUMBER_OF_BITS 13 /* fract format 1.NUMBER_OF_BITS = 1.13 */
#define BITS_PER_TWID 13 /* bits per twiddle coefficient */
#define SHIFT BITS_PER_TWID /* fractional shift after each multiplication */
/*
Forward declaration of functions
*/
float fft_exp2f(float x);
float fft_modff(float x, float *intpart);
int fft_convert(float value);
void fft_bit_reduct(register int *int_pointer);
void fft_pin_down(int input_data[]);
void fft_init(void);
__attribute__((noinline)) __attribute__((export_name("entrypoint"))) void
fft_main(void);
int fft_return(void);
__attribute__((noinline)) __attribute__((export_name("main"))) int main(void);
/*
Forward declaration of global variables
*/
int fft_input_data[2 * N_FFT];
/* precalculated twiddle factors
for an integer 1024 point FFT
in format 1.13 => table twidtable[ 2*(N_FFT-1) ] ; */
extern int fft_twidtable[2046];
/* 1024 real values as input data in float format */
extern float fft_input[1024];
/* will hold the transformed data */
int fft_inputfract[N_FFT];
/*
Algorithm core function
*/
void
fft_bit_reduct(register int *int_pointer) {
register int i, j = 0;
register int tmpr, max = 2, m, n = N_FFT << 1;
/* do the bit reversal scramble of the input data */
__pragma_loopbound(1024, 1024);
for (i = 0; i < (n - 1); i += 2) {
if (j > i) {
tmpr = *(int_pointer + j);
*(int_pointer + j) = *(int_pointer + i);
*(int_pointer + i) = tmpr;
tmpr = *(int_pointer + j + 1);
*(int_pointer + j + 1) = *(int_pointer + i + 1);
*(int_pointer + i + 1) = tmpr;
}
m = N_FFT;
__pragma_loopbound(0, 10);
while (m >= 2 && j >= m) {
j -= m;
m >>= 1;
}
j += m;
}
{
register int *data_pointer = &fft_twidtable[0];
register int *p, *q;
register int tmpi, fr = 0, level, k, l;
__pragma_loopbound(10, 10);
while (n > max) {
level = max << 1;
__pragma_loopbound(1, 512);
for (m = 1; m < max; m += 2) {
l = *(data_pointer + fr);
k = *(data_pointer + fr + 1);
fr += 2;
__pragma_loopbound(1, 512);
for (i = m; i <= n; i += level) {
j = i + max;
p = int_pointer + j;
q = int_pointer + i;
tmpr = l * *(p - 1);
tmpr -= (k * *p);
tmpi = l * *p;
tmpi += (k * *(p - 1));
tmpr = tmpr >> SHIFT;
tmpi = tmpi >> SHIFT;
*(p - 1) = *(q - 1) - tmpr;
*p = *q - tmpi;
*(q - 1) += tmpr;
*q += tmpi;
}
}
/* implement unconditional bit reduction */
{
register int f;
p = int_pointer;
__pragma_loopbound(2048, 2048);
for (f = 0; f < 2 * N_FFT; f++) {
*p = *p >> 1;
p++;
}
}
max = level;
}
}
}
/*
Initialization- and return-value-related functions
*/
/* conversion function to 1.NUMBER_OF_BITS format */
float
fft_exp2f(float x) {
int i;
float ret = 2.0f;
__pragma_loopbound(13, 13);
for (i = 1; i < x; ++i)
ret *= 2.0f;
return ret;
}
float
fft_modff(float x, float *intpart) {
if (intpart) {
*intpart = (int) x;
return x - *intpart;
} else
return x;
}
/* conversion function to 1.NUMBER_OF_BITS format */
int
fft_convert(float value) {
float man, t_val, frac, m, exponent = NUMBER_OF_BITS;
int rnd_val;
unsigned long int_val;
unsigned long pm_val;
m = fft_exp2f(exponent + 1) - 1;
t_val = value * m;
frac = fft_modff(t_val, &man);
if (frac < 0.0f) {
rnd_val = (-1);
if (frac > -0.5f)
rnd_val = 0;
} else {
rnd_val = 1;
if (frac < 0.5f)
rnd_val = 0;
}
int_val = (long) man + (long) rnd_val;
pm_val = int_val;
return ((int) (pm_val));
}
void
fft_float2fract(void) {
float f;
int j, i;
__pragma_loopbound(1024, 1024);
for (j = 0; j < N_FFT; j++) {
f = fft_input[j];
i = fft_convert(f);
fft_inputfract[j] = i;
}
}
void
fft_pin_down(int input_data[]) {
/* conversion from input to a 1.13 format */
fft_float2fract();
int *pd, *ps, f;
pd = &input_data[0];
ps = &fft_inputfract[0];
__pragma_loopbound(1024, 1024);
for (f = 0; f < N_FFT; f++) {
*pd++ = *ps++; /* fill in with real data */
*pd++ = 0; /* imaginary data is equal zero */
}
}
void
fft_init(void) {
int i;
volatile int x = 0;
fft_pin_down(&fft_input_data[0]);
/* avoid constant propagation of input values */
__pragma_loopbound(2046, 2046);
for (i = 0; i < 2 * (N_FFT - 1); i++) {
fft_input_data[i] += x;
fft_twidtable[i] += x;
}
__pragma_loopbound(2, 2);
for (; i < 2 * N_FFT; i++)
fft_input_data[i] += x;
}
int
fft_return(void) {
int check_sum = 0;
int i = 0;
__pragma_loopbound(2048, 2048);
for (i = 0; i < 2 * N_FFT; ++i)
check_sum += fft_input_data[i];
return check_sum != 3968;
}
/*
Main functions
*/
__attribute__((noinline)) __attribute__((export_name("entrypoint"))) void
fft_main(void) {
fft_bit_reduct(&fft_input_data[0]);
}
__attribute__((noinline)) __attribute__((export_name("main"))) int
main(void) {
fft_init();
fft_main();
return fft_return();
}

View File

@ -0,0 +1,320 @@
int fft_twidtable[2046] = {
8192, 0, 8192, 0, 0, -8192, 8192, 0, 5792, -5792, 0,
-8191, -5792, -5792, 8192, 0, 7568, -3134, 5792, -5792, 3134, -7568,
0, -8192, -3134, -7568, -5792, -5792, -7568, -3134, 8192, 0, 8034,
-1598, 7568, -3134, 6811, -4551, 5792, -5792, 4551, -6811, 3134, -7568,
1598, -8034, 0, -8192, -1598, -8034, -3134, -7568, -4551, -6811, -5792,
-5792, -6811, -4551, -7568, -3134, -8034, -1598, 8192, 0, 8152, -802,
8034, -1598, 7839, -2378, 7568, -3134, 7224, -3861, 6811, -4551, 6332,
-5196, 5792, -5792, 5196, -6332, 4551, -6811, 3861, -7224, 3134, -7568,
2378, -7839, 1598, -8034, 802, -8152, 0, -8191, -802, -8152, -1598,
-8034, -2378, -7839, -3134, -7568, -3861, -7224, -4551, -6811, -5196, -6332,
-5792, -5792, -6332, -5196, -6811, -4551, -7224, -3861, -7568, -3134, -7839,
-2378, -8034, -1598, -8152, -802, 8192, 0, 8182, -401, 8152, -802,
8103, -1202, 8034, -1598, 7946, -1990, 7839, -2378, 7713, -2759, 7568,
-3134, 7405, -3502, 7224, -3861, 7026, -4211, 6811, -4551, 6579, -4879,
6332, -5196, 6069, -5501, 5792, -5792, 5501, -6069, 5196, -6332, 4879,
-6579, 4551, -6811, 4211, -7026, 3861, -7224, 3502, -7405, 3134, -7568,
2759, -7713, 2378, -7839, 1990, -7946, 1598, -8034, 1202, -8103, 802,
-8152, 401, -8182, 0, -8192, -401, -8182, -802, -8152, -1202, -8103,
-1598, -8034, -1990, -7946, -2378, -7839, -2759, -7713, -3134, -7568, -3502,
-7405, -3861, -7224, -4211, -7026, -4551, -6811, -4879, -6579, -5196, -6332,
-5501, -6069, -5792, -5792, -6069, -5501, -6332, -5196, -6579, -4879, -6811,
-4551, -7026, -4211, -7224, -3861, -7405, -3502, -7568, -3134, -7713, -2759,
-7839, -2378, -7946, -1990, -8034, -1598, -8103, -1202, -8152, -802, -8182,
-401, 8192, 0, 8189, -201, 8182, -401, 8169, -602, 8152, -802,
8130, -1002, 8103, -1202, 8071, -1400, 8034, -1598, 7992, -1794, 7946,
-1990, 7895, -2184, 7839, -2378, 7778, -2569, 7713, -2759, 7643, -2948,
7568, -3134, 7489, -3319, 7405, -3502, 7317, -3683, 7224, -3861, 7127,
-4037, 7026, -4211, 6921, -4382, 6811, -4551, 6697, -4717, 6579, -4879,
6458, -5039, 6332, -5196, 6203, -5350, 6069, -5501, 5933, -5648, 5792,
-5792, 5648, -5933, 5501, -6069, 5350, -6203, 5196, -6332, 5039, -6458,
4879, -6579, 4717, -6697, 4551, -6811, 4382, -6921, 4211, -7026, 4037,
-7127, 3861, -7224, 3683, -7317, 3502, -7405, 3319, -7489, 3134, -7568,
2948, -7643, 2759, -7713, 2569, -7778, 2378, -7839, 2184, -7895, 1990,
-7946, 1794, -7992, 1598, -8034, 1400, -8071, 1202, -8103, 1002, -8130,
802, -8152, 602, -8169, 401, -8182, 201, -8189, 0, -8192, -201,
-8189, -401, -8182, -602, -8169, -802, -8152, -1002, -8130, -1202, -8103,
-1400, -8071, -1598, -8034, -1794, -7992, -1990, -7946, -2184, -7895, -2378,
-7839, -2569, -7778, -2759, -7713, -2948, -7643, -3134, -7568, -3319, -7489,
-3502, -7405, -3683, -7317, -3861, -7224, -4037, -7127, -4211, -7026, -4382,
-6921, -4551, -6811, -4717, -6697, -4879, -6579, -5039, -6458, -5196, -6332,
-5350, -6203, -5501, -6069, -5648, -5933, -5792, -5792, -5933, -5648, -6069,
-5501, -6203, -5350, -6332, -5196, -6458, -5039, -6579, -4879, -6697, -4717,
-6811, -4551, -6921, -4382, -7026, -4211, -7127, -4037, -7224, -3861, -7317,
-3683, -7405, -3502, -7489, -3319, -7568, -3134, -7643, -2948, -7713, -2759,
-7778, -2569, -7839, -2378, -7895, -2184, -7946, -1990, -7992, -1794, -8034,
-1598, -8071, -1400, -8103, -1202, -8130, -1002, -8152, -802, -8169, -602,
-8182, -401, -8189, -201, 8192, 0, 8191, -100, 8189, -201, 8186,
-301, 8182, -401, 8176, -502, 8169, -602, 8161, -702, 8152, -802,
8142, -902, 8130, -1002, 8117, -1102, 8103, -1202, 8087, -1301, 8071,
-1400, 8053, -1499, 8034, -1598, 8014, -1696, 7992, -1794, 7970, -1892,
7946, -1990, 7921, -2087, 7895, -2184, 7867, -2281, 7839, -2378, 7809,
-2474, 7778, -2569, 7746, -2664, 7713, -2759, 7678, -2854, 7643, -2948,
7606, -3041, 7568, -3134, 7529, -3227, 7489, -3319, 7447, -3411, 7405,
-3502, 7361, -3593, 7317, -3683, 7271, -3772, 7224, -3861, 7176, -3950,
7127, -4037, 7077, -4124, 7026, -4211, 6974, -4297, 6921, -4382, 6866,
-4467, 6811, -4551, 6755, -4634, 6697, -4717, 6639, -4798, 6579, -4879,
6519, -4960, 6458, -5039, 6395, -5118, 6332, -5196, 6268, -5274, 6203,
-5350, 6136, -5426, 6069, -5501, 6001, -5575, 5933, -5648, 5863, -5721,
5792, -5792, 5721, -5863, 5648, -5933, 5575, -6001, 5501, -6069, 5426,
-6136, 5350, -6203, 5274, -6268, 5196, -6332, 5118, -6395, 5039, -6458,
4960, -6519, 4879, -6579, 4798, -6639, 4717, -6697, 4634, -6755, 4551,
-6811, 4467, -6866, 4382, -6921, 4297, -6974, 4211, -7026, 4124, -7077,
4037, -7127, 3950, -7176, 3861, -7224, 3772, -7271, 3683, -7317, 3593,
-7361, 3502, -7405, 3411, -7447, 3319, -7489, 3227, -7529, 3134, -7568,
3041, -7606, 2948, -7643, 2854, -7678, 2759, -7713, 2664, -7746, 2569,
-7778, 2474, -7809, 2378, -7839, 2281, -7867, 2184, -7895, 2087, -7921,
1990, -7946, 1892, -7970, 1794, -7992, 1696, -8014, 1598, -8034, 1499,
-8053, 1400, -8071, 1301, -8087, 1202, -8103, 1102, -8117, 1002, -8130,
902, -8142, 802, -8152, 702, -8161, 602, -8169, 502, -8176, 401,
-8182, 301, -8186, 201, -8189, 100, -8191, 0, -8192, -100, -8191,
-201, -8189, -301, -8186, -401, -8182, -502, -8176, -602, -8169, -702,
-8161, -802, -8152, -902, -8142, -1002, -8130, -1102, -8117, -1202, -8103,
-1301, -8087, -1400, -8071, -1499, -8053, -1598, -8034, -1696, -8014, -1794,
-7992, -1892, -7970, -1990, -7946, -2087, -7921, -2184, -7895, -2281, -7867,
-2378, -7839, -2474, -7809, -2569, -7778, -2664, -7746, -2759, -7713, -2854,
-7678, -2948, -7643, -3041, -7606, -3134, -7568, -3227, -7529, -3319, -7489,
-3411, -7447, -3502, -7405, -3593, -7361, -3683, -7317, -3772, -7271, -3861,
-7224, -3950, -7176, -4037, -7127, -4124, -7077, -4211, -7026, -4297, -6974,
-4382, -6921, -4467, -6866, -4551, -6811, -4634, -6755, -4717, -6697, -4798,
-6639, -4879, -6579, -4960, -6519, -5039, -6458, -5118, -6395, -5196, -6332,
-5274, -6268, -5350, -6203, -5426, -6136, -5501, -6069, -5575, -6001, -5648,
-5933, -5721, -5863, -5792, -5792, -5863, -5721, -5933, -5648, -6001, -5575,
-6069, -5501, -6136, -5426, -6203, -5350, -6268, -5274, -6332, -5196, -6395,
-5118, -6458, -5039, -6519, -4960, -6579, -4879, -6639, -4798, -6697, -4717,
-6755, -4634, -6811, -4551, -6866, -4467, -6921, -4382, -6974, -4297, -7026,
-4211, -7077, -4124, -7127, -4037, -7176, -3950, -7224, -3861, -7271, -3772,
-7317, -3683, -7361, -3593, -7405, -3502, -7447, -3411, -7489, -3319, -7529,
-3227, -7568, -3134, -7606, -3041, -7643, -2948, -7678, -2854, -7713, -2759,
-7746, -2664, -7778, -2569, -7809, -2474, -7839, -2378, -7867, -2281, -7895,
-2184, -7921, -2087, -7946, -1990, -7970, -1892, -7992, -1794, -8014, -1696,
-8034, -1598, -8053, -1499, -8071, -1400, -8087, -1301, -8103, -1202, -8117,
-1102, -8130, -1002, -8142, -902, -8152, -802, -8161, -702, -8169, -602,
-8176, -502, -8182, -401, -8186, -301, -8189, -201, -8191, -100, 8192,
0, 8191, -50, 8191, -100, 8190, -150, 8189, -201, 8188, -251,
8186, -301, 8184, -351, 8182, -401, 8179, -452, 8176, -502, 8173,
-552, 8169, -602, 8165, -652, 8161, -702, 8157, -752, 8152, -802,
8147, -852, 8142, -902, 8136, -952, 8130, -1002, 8124, -1052, 8117,
-1102, 8110, -1152, 8103, -1202, 8095, -1251, 8087, -1301, 8079, -1350,
8071, -1400, 8062, -1450, 8053, -1499, 8044, -1548, 8034, -1598, 8024,
-1647, 8014, -1696, 8003, -1745, 7992, -1794, 7981, -1843, 7970, -1892,
7958, -1941, 7946, -1990, 7934, -2039, 7921, -2087, 7908, -2136, 7895,
-2184, 7881, -2233, 7867, -2281, 7853, -2329, 7839, -2378, 7824, -2426,
7809, -2474, 7794, -2521, 7778, -2569, 7762, -2617, 7746, -2664, 7729,
-2712, 7713, -2759, 7696, -2807, 7678, -2854, 7661, -2901, 7643, -2948,
7624, -2995, 7606, -3041, 7587, -3088, 7568, -3134, 7549, -3181, 7529,
-3227, 7509, -3273, 7489, -3319, 7468, -3365, 7447, -3411, 7426, -3457,
7405, -3502, 7383, -3547, 7361, -3593, 7339, -3638, 7317, -3683, 7294,
-3728, 7271, -3772, 7248, -3817, 7224, -3861, 7200, -3905, 7176, -3950,
7152, -3994, 7127, -4037, 7102, -4081, 7077, -4124, 7052, -4168, 7026,
-4211, 7000, -4254, 6974, -4297, 6947, -4340, 6921, -4382, 6894, -4425,
6866, -4467, 6839, -4509, 6811, -4551, 6783, -4592, 6755, -4634, 6726,
-4675, 6697, -4717, 6668, -4758, 6639, -4798, 6609, -4839, 6579, -4879,
6549, -4920, 6519, -4960, 6488, -5000, 6458, -5039, 6427, -5079, 6395,
-5118, 6364, -5157, 6332, -5196, 6300, -5235, 6268, -5274, 6235, -5312,
6203, -5350, 6170, -5388, 6136, -5426, 6103, -5464, 6069, -5501, 6036,
-5538, 6001, -5575, 5967, -5612, 5933, -5648, 5898, -5685, 5863, -5721,
5828, -5756, 5792, -5792, 5756, -5828, 5721, -5863, 5685, -5898, 5648,
-5933, 5612, -5967, 5575, -6001, 5538, -6036, 5501, -6069, 5464, -6103,
5426, -6136, 5388, -6170, 5350, -6203, 5312, -6235, 5274, -6268, 5235,
-6300, 5196, -6332, 5157, -6364, 5118, -6395, 5079, -6427, 5039, -6458,
5000, -6488, 4960, -6519, 4920, -6549, 4879, -6579, 4839, -6609, 4798,
-6639, 4758, -6668, 4717, -6697, 4675, -6726, 4634, -6755, 4592, -6783,
4551, -6811, 4509, -6839, 4467, -6866, 4425, -6894, 4382, -6921, 4340,
-6947, 4297, -6974, 4254, -7000, 4211, -7026, 4168, -7052, 4124, -7077,
4081, -7102, 4037, -7127, 3994, -7152, 3950, -7176, 3905, -7200, 3861,
-7224, 3817, -7248, 3772, -7271, 3728, -7294, 3683, -7317, 3638, -7339,
3593, -7361, 3547, -7383, 3502, -7405, 3457, -7426, 3411, -7447, 3365,
-7468, 3319, -7489, 3273, -7509, 3227, -7529, 3181, -7549, 3134, -7568,
3088, -7587, 3041, -7606, 2995, -7624, 2948, -7643, 2901, -7661, 2854,
-7678, 2807, -7696, 2759, -7713, 2712, -7729, 2664, -7746, 2617, -7762,
2569, -7778, 2521, -7794, 2474, -7809, 2426, -7824, 2378, -7839, 2329,
-7853, 2281, -7867, 2233, -7881, 2184, -7895, 2136, -7908, 2087, -7921,
2039, -7934, 1990, -7946, 1941, -7958, 1892, -7970, 1843, -7981, 1794,
-7992, 1745, -8003, 1696, -8014, 1647, -8024, 1598, -8034, 1548, -8044,
1499, -8053, 1450, -8062, 1400, -8071, 1350, -8079, 1301, -8087, 1251,
-8095, 1202, -8103, 1152, -8110, 1102, -8117, 1052, -8124, 1002, -8130,
952, -8136, 902, -8142, 852, -8147, 802, -8152, 752, -8157, 702,
-8161, 652, -8165, 602, -8169, 552, -8173, 502, -8176, 452, -8179,
401, -8182, 351, -8184, 301, -8186, 251, -8188, 201, -8189, 150,
-8190, 100, -8191, 50, -8191, 0, -8191, -50, -8191, -100, -8191,
-150, -8190, -201, -8189, -251, -8188, -301, -8186, -351, -8184, -401,
-8182, -452, -8179, -502, -8176, -552, -8173, -602, -8169, -652, -8165,
-702, -8161, -752, -8157, -802, -8152, -852, -8147, -902, -8142, -952,
-8136, -1002, -8130, -1052, -8124, -1102, -8117, -1152, -8110, -1202, -8103,
-1251, -8095, -1301, -8087, -1350, -8079, -1400, -8071, -1450, -8062, -1499,
-8053, -1548, -8044, -1598, -8034, -1647, -8024, -1696, -8014, -1745, -8003,
-1794, -7992, -1843, -7981, -1892, -7970, -1941, -7958, -1990, -7946, -2039,
-7934, -2087, -7921, -2136, -7908, -2184, -7895, -2233, -7881, -2281, -7867,
-2329, -7853, -2378, -7839, -2426, -7824, -2474, -7809, -2521, -7794, -2569,
-7778, -2617, -7762, -2664, -7746, -2712, -7729, -2759, -7713, -2807, -7696,
-2854, -7678, -2901, -7661, -2948, -7643, -2995, -7624, -3041, -7606, -3088,
-7587, -3134, -7568, -3181, -7549, -3227, -7529, -3273, -7509, -3319, -7489,
-3365, -7468, -3411, -7447, -3457, -7426, -3502, -7405, -3547, -7383, -3593,
-7361, -3638, -7339, -3683, -7317, -3728, -7294, -3772, -7271, -3817, -7248,
-3861, -7224, -3905, -7200, -3950, -7176, -3994, -7152, -4037, -7127, -4081,
-7102, -4124, -7077, -4168, -7052, -4211, -7026, -4254, -7000, -4297, -6974,
-4340, -6947, -4382, -6921, -4425, -6894, -4467, -6866, -4509, -6839, -4551,
-6811, -4592, -6783, -4634, -6755, -4675, -6726, -4717, -6697, -4758, -6668,
-4798, -6639, -4839, -6609, -4879, -6579, -4920, -6549, -4960, -6519, -5000,
-6488, -5039, -6458, -5079, -6427, -5118, -6395, -5157, -6364, -5196, -6332,
-5235, -6300, -5274, -6268, -5312, -6235, -5350, -6203, -5388, -6170, -5426,
-6136, -5464, -6103, -5501, -6069, -5538, -6035, -5575, -6001, -5612, -5967,
-5648, -5933, -5685, -5898, -5721, -5863, -5756, -5828, -5792, -5792, -5828,
-5756, -5863, -5721, -5898, -5685, -5933, -5648, -5967, -5612, -6001, -5575,
-6036, -5538, -6069, -5501, -6103, -5464, -6136, -5426, -6170, -5388, -6203,
-5350, -6235, -5312, -6268, -5274, -6300, -5235, -6332, -5196, -6364, -5157,
-6395, -5118, -6427, -5079, -6458, -5039, -6488, -5000, -6519, -4960, -6549,
-4920, -6579, -4879, -6609, -4839, -6639, -4798, -6668, -4758, -6697, -4717,
-6726, -4675, -6755, -4634, -6783, -4592, -6811, -4551, -6839, -4509, -6866,
-4467, -6894, -4425, -6921, -4382, -6947, -4340, -6974, -4297, -7000, -4254,
-7026, -4211, -7052, -4168, -7077, -4124, -7102, -4081, -7127, -4037, -7152,
-3994, -7176, -3950, -7200, -3905, -7224, -3861, -7248, -3817, -7271, -3772,
-7294, -3728, -7317, -3683, -7339, -3638, -7361, -3593, -7383, -3547, -7405,
-3502, -7426, -3457, -7447, -3411, -7468, -3365, -7489, -3319, -7509, -3273,
-7529, -3227, -7549, -3181, -7568, -3134, -7587, -3088, -7606, -3041, -7624,
-2995, -7643, -2948, -7661, -2901, -7678, -2854, -7696, -2807, -7713, -2759,
-7729, -2712, -7746, -2664, -7762, -2617, -7778, -2569, -7794, -2521, -7809,
-2474, -7824, -2426, -7839, -2378, -7853, -2329, -7867, -2281, -7881, -2233,
-7895, -2184, -7908, -2136, -7921, -2087, -7934, -2039, -7946, -1990, -7958,
-1941, -7970, -1892, -7981, -1843, -7992, -1794, -8003, -1745, -8014, -1696,
-8024, -1647, -8034, -1598, -8044, -1548, -8053, -1499, -8062, -1450, -8071,
-1400, -8079, -1350, -8087, -1301, -8095, -1251, -8103, -1202, -8110, -1152,
-8117, -1102, -8124, -1052, -8130, -1002, -8136, -952, -8142, -902, -8147,
-852, -8152, -802, -8157, -752, -8161, -702, -8165, -652, -8169, -602,
-8173, -552, -8176, -502, -8179, -452, -8182, -401, -8184, -351, -8186,
-301, -8188, -251, -8189, -201, -8190, -150, -8191, -100, -8191, -50};
/* 1024 real values as input data in float format */
float fft_input[1024] = {
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f};

View File

@ -0,0 +1,342 @@
/*
This program is part of the TACLeBench benchmark suite.
Version V 2.0
Name: fft
Author: Juan Martinez Velarde
Function: benchmarking of an integer stage scaling FFT
To avoid errors caused by overflow and bit growth,
the input data is scaled. Bit growth occurs potentially
at butterfly operations, which involve a complex
multiplication, a complex addition and a complex
subtraction. Maximal bit growth from butterfly input
to butterfly output is two bits.
The input data includes enough extra sign bits, called
guard bits, to ensure that bit growth never results in
overflow (Rabiner and Gold, 1975). Data can grow by a
maximum factor of 2.4 from butterfly input to output
(two bits of grow). However, a data value cannot grow by
maximum amount in two consecutive stages.
The number of guard bits necessary to compensate the
maximum bit growth in an N-point FFT is (log_2 (N))+1).
In a 16-point FFT (requires 4 stages), each of the
input samples should contain 5 guard bits. The input
data is then restricted to 10 bits, one sign bit and
nine magnitude bits, in order to prevent an
overflow from the integer multiplication with the
precalculed twiddle coefficients.
Another method to compensate bit growth is to scale the
outputs down by a factor of two unconditionally after
each stage. This approach is called unconditional scaling
Initially, 2 guard bits are included in the input data to
accomodate the maximum overflow in the first stage.
In each butterfly of a stage calculation, the data can
grow into the guard bits. To prevent overflow in the next
stage, the guard bits are replaced before the next stage is
executed by shifting the entire block of data one bit
to the right.
Input data should not be restricted to a 1.9 format.
Input data can be represented in a 1.13 format,that is
14 significant bits, one sign and 13 magnitude bits. In
the FFT calculation, the data loses a total of (log2 N) -1
bits because of shifting. Unconditional scaling results
in the same number of bits lost as in the input data scaling.
However, it produces more precise results because the
FFT starts with more precise input data. The tradeoff is
a slower FFT calculation because of the extra cycles needed
to shift the output of each stage.
Source: DSP-Stone
http://www.ice.rwth-aachen.de/research/tools-projects/entry/detail/dspstone/
Original name: fft_1024_13
(merged main1024_bit_reduct and fft_bit_reduct from DSP-Stone)
Changes: no major functional changes
License: may be used, modified, and re-distributed freely
*/
// Wasm loop bounds
#include "fft_input.c"
__attribute__((import_module("__pragma"), import_name("loopbound"))) extern void
__pragma_loopbound(unsigned int min_bound, unsigned int max_bound);
#define N_FFT 1024
#define NUMBER_OF_BITS 13 /* fract format 1.NUMBER_OF_BITS = 1.13 */
#define BITS_PER_TWID 13 /* bits per twiddle coefficient */
#define SHIFT BITS_PER_TWID /* fractional shift after each multiplication */
/*
Forward declaration of functions
*/
__attribute__((always_inline)) static inline float fft_exp2f(float x);
__attribute__((always_inline)) static inline float fft_modff(float x,
float *intpart);
__attribute__((always_inline)) static inline int fft_convert(float value);
__attribute__((always_inline)) static inline void
fft_bit_reduct(register int *int_pointer);
__attribute__((always_inline)) static inline void
fft_pin_down(int input_data[]);
__attribute__((always_inline)) static inline void fft_init(void);
__attribute__((noinline)) __attribute__((export_name("entrypoint")))
__attribute__((noinline)) __attribute__((export_name("entrypoint"))) void
fft_main(void);
__attribute__((always_inline)) static inline int fft_return(void);
__attribute__((noinline)) __attribute__((export_name("main")))
__attribute__((noinline)) __attribute__((export_name("main"))) int
main(void);
/*
Forward declaration of global variables
*/
int fft_input_data[2 * N_FFT];
/* precalculated twiddle factors
for an integer 1024 point FFT
in format 1.13 => table twidtable[ 2*(N_FFT-1) ] ; */
extern int fft_twidtable[2046];
/* 1024 real values as input data in float format */
extern float fft_input[1024];
/* will hold the transformed data */
int fft_inputfract[N_FFT];
/*
Algorithm core function
*/
__attribute__((always_inline)) static inline void
fft_bit_reduct(register int *int_pointer) {
register int i, j = 0;
register int tmpr, max = 2, m, n = N_FFT << 1;
/* do the bit reversal scramble of the input data */
__pragma_loopbound(1024, 1024);
for (i = 0; i < (n - 1); i += 2) {
if (j > i) {
tmpr = *(int_pointer + j);
*(int_pointer + j) = *(int_pointer + i);
*(int_pointer + i) = tmpr;
tmpr = *(int_pointer + j + 1);
*(int_pointer + j + 1) = *(int_pointer + i + 1);
*(int_pointer + i + 1) = tmpr;
}
m = N_FFT;
__pragma_loopbound(0, 10);
while (m >= 2 && j >= m) {
j -= m;
m >>= 1;
}
j += m;
}
{
register int *data_pointer = &fft_twidtable[0];
register int *p, *q;
register int tmpi, fr = 0, level, k, l;
__pragma_loopbound(10, 10);
while (n > max) {
level = max << 1;
__pragma_loopbound(1, 512);
for (m = 1; m < max; m += 2) {
l = *(data_pointer + fr);
k = *(data_pointer + fr + 1);
fr += 2;
__pragma_loopbound(1, 512);
for (i = m; i <= n; i += level) {
j = i + max;
p = int_pointer + j;
q = int_pointer + i;
tmpr = l * *(p - 1);
tmpr -= (k * *p);
tmpi = l * *p;
tmpi += (k * *(p - 1));
tmpr = tmpr >> SHIFT;
tmpi = tmpi >> SHIFT;
*(p - 1) = *(q - 1) - tmpr;
*p = *q - tmpi;
*(q - 1) += tmpr;
*q += tmpi;
}
}
/* implement unconditional bit reduction */
{
register int f;
p = int_pointer;
__pragma_loopbound(2048, 2048);
for (f = 0; f < 2 * N_FFT; f++) {
*p = *p >> 1;
p++;
}
}
max = level;
}
}
}
/*
Initialization- and return-value-related functions
*/
/* conversion function to 1.NUMBER_OF_BITS format */
__attribute__((always_inline)) static inline float
fft_exp2f(float x) {
int i;
float ret = 2.0f;
__pragma_loopbound(13, 13);
for (i = 1; i < x; ++i)
ret *= 2.0f;
return ret;
}
__attribute__((always_inline)) static inline float
fft_modff(float x, float *intpart) {
if (intpart) {
*intpart = (int) x;
return x - *intpart;
} else
return x;
}
/* conversion function to 1.NUMBER_OF_BITS format */
__attribute__((always_inline)) static inline int
fft_convert(float value) {
float man, t_val, frac, m, exponent = NUMBER_OF_BITS;
int rnd_val;
unsigned long int_val;
unsigned long pm_val;
m = fft_exp2f(exponent + 1) - 1;
t_val = value * m;
frac = fft_modff(t_val, &man);
if (frac < 0.0f) {
rnd_val = (-1);
if (frac > -0.5f)
rnd_val = 0;
} else {
rnd_val = 1;
if (frac < 0.5f)
rnd_val = 0;
}
int_val = (long) man + (long) rnd_val;
pm_val = int_val;
return ((int) (pm_val));
}
__attribute__((always_inline)) static inline void
fft_float2fract(void) {
float f;
int j, i;
__pragma_loopbound(1024, 1024);
for (j = 0; j < N_FFT; j++) {
f = fft_input[j];
i = fft_convert(f);
fft_inputfract[j] = i;
}
}
__attribute__((always_inline)) static inline void
fft_pin_down(int input_data[]) {
/* conversion from input to a 1.13 format */
fft_float2fract();
int *pd, *ps, f;
pd = &input_data[0];
ps = &fft_inputfract[0];
__pragma_loopbound(1024, 1024);
for (f = 0; f < N_FFT; f++) {
*pd++ = *ps++; /* fill in with real data */
*pd++ = 0; /* imaginary data is equal zero */
}
}
__attribute__((always_inline)) static inline void
fft_init(void) {
int i;
volatile int x = 0;
fft_pin_down(&fft_input_data[0]);
/* avoid constant propagation of input values */
__pragma_loopbound(2046, 2046);
for (i = 0; i < 2 * (N_FFT - 1); i++) {
fft_input_data[i] += x;
fft_twidtable[i] += x;
}
__pragma_loopbound(2, 2);
for (; i < 2 * N_FFT; i++)
fft_input_data[i] += x;
}
__attribute__((always_inline)) static inline int
fft_return(void) {
int check_sum = 0;
int i = 0;
__pragma_loopbound(2048, 2048);
for (i = 0; i < 2 * N_FFT; ++i)
check_sum += fft_input_data[i];
return check_sum != 3968;
}
/*
Main functions
*/
__attribute__((noinline)) __attribute__((export_name("entrypoint")))
__attribute__((noinline)) __attribute__((export_name("entrypoint"))) void
fft_main(void) {
fft_bit_reduct(&fft_input_data[0]);
}
__attribute__((noinline)) __attribute__((export_name("main")))
__attribute__((noinline)) __attribute__((export_name("main"))) int
main(void) {
fft_init();
fft_main();
return fft_return();
}

View File

@ -0,0 +1,320 @@
int fft_twidtable[2046] = {
8192, 0, 8192, 0, 0, -8192, 8192, 0, 5792, -5792, 0,
-8191, -5792, -5792, 8192, 0, 7568, -3134, 5792, -5792, 3134, -7568,
0, -8192, -3134, -7568, -5792, -5792, -7568, -3134, 8192, 0, 8034,
-1598, 7568, -3134, 6811, -4551, 5792, -5792, 4551, -6811, 3134, -7568,
1598, -8034, 0, -8192, -1598, -8034, -3134, -7568, -4551, -6811, -5792,
-5792, -6811, -4551, -7568, -3134, -8034, -1598, 8192, 0, 8152, -802,
8034, -1598, 7839, -2378, 7568, -3134, 7224, -3861, 6811, -4551, 6332,
-5196, 5792, -5792, 5196, -6332, 4551, -6811, 3861, -7224, 3134, -7568,
2378, -7839, 1598, -8034, 802, -8152, 0, -8191, -802, -8152, -1598,
-8034, -2378, -7839, -3134, -7568, -3861, -7224, -4551, -6811, -5196, -6332,
-5792, -5792, -6332, -5196, -6811, -4551, -7224, -3861, -7568, -3134, -7839,
-2378, -8034, -1598, -8152, -802, 8192, 0, 8182, -401, 8152, -802,
8103, -1202, 8034, -1598, 7946, -1990, 7839, -2378, 7713, -2759, 7568,
-3134, 7405, -3502, 7224, -3861, 7026, -4211, 6811, -4551, 6579, -4879,
6332, -5196, 6069, -5501, 5792, -5792, 5501, -6069, 5196, -6332, 4879,
-6579, 4551, -6811, 4211, -7026, 3861, -7224, 3502, -7405, 3134, -7568,
2759, -7713, 2378, -7839, 1990, -7946, 1598, -8034, 1202, -8103, 802,
-8152, 401, -8182, 0, -8192, -401, -8182, -802, -8152, -1202, -8103,
-1598, -8034, -1990, -7946, -2378, -7839, -2759, -7713, -3134, -7568, -3502,
-7405, -3861, -7224, -4211, -7026, -4551, -6811, -4879, -6579, -5196, -6332,
-5501, -6069, -5792, -5792, -6069, -5501, -6332, -5196, -6579, -4879, -6811,
-4551, -7026, -4211, -7224, -3861, -7405, -3502, -7568, -3134, -7713, -2759,
-7839, -2378, -7946, -1990, -8034, -1598, -8103, -1202, -8152, -802, -8182,
-401, 8192, 0, 8189, -201, 8182, -401, 8169, -602, 8152, -802,
8130, -1002, 8103, -1202, 8071, -1400, 8034, -1598, 7992, -1794, 7946,
-1990, 7895, -2184, 7839, -2378, 7778, -2569, 7713, -2759, 7643, -2948,
7568, -3134, 7489, -3319, 7405, -3502, 7317, -3683, 7224, -3861, 7127,
-4037, 7026, -4211, 6921, -4382, 6811, -4551, 6697, -4717, 6579, -4879,
6458, -5039, 6332, -5196, 6203, -5350, 6069, -5501, 5933, -5648, 5792,
-5792, 5648, -5933, 5501, -6069, 5350, -6203, 5196, -6332, 5039, -6458,
4879, -6579, 4717, -6697, 4551, -6811, 4382, -6921, 4211, -7026, 4037,
-7127, 3861, -7224, 3683, -7317, 3502, -7405, 3319, -7489, 3134, -7568,
2948, -7643, 2759, -7713, 2569, -7778, 2378, -7839, 2184, -7895, 1990,
-7946, 1794, -7992, 1598, -8034, 1400, -8071, 1202, -8103, 1002, -8130,
802, -8152, 602, -8169, 401, -8182, 201, -8189, 0, -8192, -201,
-8189, -401, -8182, -602, -8169, -802, -8152, -1002, -8130, -1202, -8103,
-1400, -8071, -1598, -8034, -1794, -7992, -1990, -7946, -2184, -7895, -2378,
-7839, -2569, -7778, -2759, -7713, -2948, -7643, -3134, -7568, -3319, -7489,
-3502, -7405, -3683, -7317, -3861, -7224, -4037, -7127, -4211, -7026, -4382,
-6921, -4551, -6811, -4717, -6697, -4879, -6579, -5039, -6458, -5196, -6332,
-5350, -6203, -5501, -6069, -5648, -5933, -5792, -5792, -5933, -5648, -6069,
-5501, -6203, -5350, -6332, -5196, -6458, -5039, -6579, -4879, -6697, -4717,
-6811, -4551, -6921, -4382, -7026, -4211, -7127, -4037, -7224, -3861, -7317,
-3683, -7405, -3502, -7489, -3319, -7568, -3134, -7643, -2948, -7713, -2759,
-7778, -2569, -7839, -2378, -7895, -2184, -7946, -1990, -7992, -1794, -8034,
-1598, -8071, -1400, -8103, -1202, -8130, -1002, -8152, -802, -8169, -602,
-8182, -401, -8189, -201, 8192, 0, 8191, -100, 8189, -201, 8186,
-301, 8182, -401, 8176, -502, 8169, -602, 8161, -702, 8152, -802,
8142, -902, 8130, -1002, 8117, -1102, 8103, -1202, 8087, -1301, 8071,
-1400, 8053, -1499, 8034, -1598, 8014, -1696, 7992, -1794, 7970, -1892,
7946, -1990, 7921, -2087, 7895, -2184, 7867, -2281, 7839, -2378, 7809,
-2474, 7778, -2569, 7746, -2664, 7713, -2759, 7678, -2854, 7643, -2948,
7606, -3041, 7568, -3134, 7529, -3227, 7489, -3319, 7447, -3411, 7405,
-3502, 7361, -3593, 7317, -3683, 7271, -3772, 7224, -3861, 7176, -3950,
7127, -4037, 7077, -4124, 7026, -4211, 6974, -4297, 6921, -4382, 6866,
-4467, 6811, -4551, 6755, -4634, 6697, -4717, 6639, -4798, 6579, -4879,
6519, -4960, 6458, -5039, 6395, -5118, 6332, -5196, 6268, -5274, 6203,
-5350, 6136, -5426, 6069, -5501, 6001, -5575, 5933, -5648, 5863, -5721,
5792, -5792, 5721, -5863, 5648, -5933, 5575, -6001, 5501, -6069, 5426,
-6136, 5350, -6203, 5274, -6268, 5196, -6332, 5118, -6395, 5039, -6458,
4960, -6519, 4879, -6579, 4798, -6639, 4717, -6697, 4634, -6755, 4551,
-6811, 4467, -6866, 4382, -6921, 4297, -6974, 4211, -7026, 4124, -7077,
4037, -7127, 3950, -7176, 3861, -7224, 3772, -7271, 3683, -7317, 3593,
-7361, 3502, -7405, 3411, -7447, 3319, -7489, 3227, -7529, 3134, -7568,
3041, -7606, 2948, -7643, 2854, -7678, 2759, -7713, 2664, -7746, 2569,
-7778, 2474, -7809, 2378, -7839, 2281, -7867, 2184, -7895, 2087, -7921,
1990, -7946, 1892, -7970, 1794, -7992, 1696, -8014, 1598, -8034, 1499,
-8053, 1400, -8071, 1301, -8087, 1202, -8103, 1102, -8117, 1002, -8130,
902, -8142, 802, -8152, 702, -8161, 602, -8169, 502, -8176, 401,
-8182, 301, -8186, 201, -8189, 100, -8191, 0, -8192, -100, -8191,
-201, -8189, -301, -8186, -401, -8182, -502, -8176, -602, -8169, -702,
-8161, -802, -8152, -902, -8142, -1002, -8130, -1102, -8117, -1202, -8103,
-1301, -8087, -1400, -8071, -1499, -8053, -1598, -8034, -1696, -8014, -1794,
-7992, -1892, -7970, -1990, -7946, -2087, -7921, -2184, -7895, -2281, -7867,
-2378, -7839, -2474, -7809, -2569, -7778, -2664, -7746, -2759, -7713, -2854,
-7678, -2948, -7643, -3041, -7606, -3134, -7568, -3227, -7529, -3319, -7489,
-3411, -7447, -3502, -7405, -3593, -7361, -3683, -7317, -3772, -7271, -3861,
-7224, -3950, -7176, -4037, -7127, -4124, -7077, -4211, -7026, -4297, -6974,
-4382, -6921, -4467, -6866, -4551, -6811, -4634, -6755, -4717, -6697, -4798,
-6639, -4879, -6579, -4960, -6519, -5039, -6458, -5118, -6395, -5196, -6332,
-5274, -6268, -5350, -6203, -5426, -6136, -5501, -6069, -5575, -6001, -5648,
-5933, -5721, -5863, -5792, -5792, -5863, -5721, -5933, -5648, -6001, -5575,
-6069, -5501, -6136, -5426, -6203, -5350, -6268, -5274, -6332, -5196, -6395,
-5118, -6458, -5039, -6519, -4960, -6579, -4879, -6639, -4798, -6697, -4717,
-6755, -4634, -6811, -4551, -6866, -4467, -6921, -4382, -6974, -4297, -7026,
-4211, -7077, -4124, -7127, -4037, -7176, -3950, -7224, -3861, -7271, -3772,
-7317, -3683, -7361, -3593, -7405, -3502, -7447, -3411, -7489, -3319, -7529,
-3227, -7568, -3134, -7606, -3041, -7643, -2948, -7678, -2854, -7713, -2759,
-7746, -2664, -7778, -2569, -7809, -2474, -7839, -2378, -7867, -2281, -7895,
-2184, -7921, -2087, -7946, -1990, -7970, -1892, -7992, -1794, -8014, -1696,
-8034, -1598, -8053, -1499, -8071, -1400, -8087, -1301, -8103, -1202, -8117,
-1102, -8130, -1002, -8142, -902, -8152, -802, -8161, -702, -8169, -602,
-8176, -502, -8182, -401, -8186, -301, -8189, -201, -8191, -100, 8192,
0, 8191, -50, 8191, -100, 8190, -150, 8189, -201, 8188, -251,
8186, -301, 8184, -351, 8182, -401, 8179, -452, 8176, -502, 8173,
-552, 8169, -602, 8165, -652, 8161, -702, 8157, -752, 8152, -802,
8147, -852, 8142, -902, 8136, -952, 8130, -1002, 8124, -1052, 8117,
-1102, 8110, -1152, 8103, -1202, 8095, -1251, 8087, -1301, 8079, -1350,
8071, -1400, 8062, -1450, 8053, -1499, 8044, -1548, 8034, -1598, 8024,
-1647, 8014, -1696, 8003, -1745, 7992, -1794, 7981, -1843, 7970, -1892,
7958, -1941, 7946, -1990, 7934, -2039, 7921, -2087, 7908, -2136, 7895,
-2184, 7881, -2233, 7867, -2281, 7853, -2329, 7839, -2378, 7824, -2426,
7809, -2474, 7794, -2521, 7778, -2569, 7762, -2617, 7746, -2664, 7729,
-2712, 7713, -2759, 7696, -2807, 7678, -2854, 7661, -2901, 7643, -2948,
7624, -2995, 7606, -3041, 7587, -3088, 7568, -3134, 7549, -3181, 7529,
-3227, 7509, -3273, 7489, -3319, 7468, -3365, 7447, -3411, 7426, -3457,
7405, -3502, 7383, -3547, 7361, -3593, 7339, -3638, 7317, -3683, 7294,
-3728, 7271, -3772, 7248, -3817, 7224, -3861, 7200, -3905, 7176, -3950,
7152, -3994, 7127, -4037, 7102, -4081, 7077, -4124, 7052, -4168, 7026,
-4211, 7000, -4254, 6974, -4297, 6947, -4340, 6921, -4382, 6894, -4425,
6866, -4467, 6839, -4509, 6811, -4551, 6783, -4592, 6755, -4634, 6726,
-4675, 6697, -4717, 6668, -4758, 6639, -4798, 6609, -4839, 6579, -4879,
6549, -4920, 6519, -4960, 6488, -5000, 6458, -5039, 6427, -5079, 6395,
-5118, 6364, -5157, 6332, -5196, 6300, -5235, 6268, -5274, 6235, -5312,
6203, -5350, 6170, -5388, 6136, -5426, 6103, -5464, 6069, -5501, 6036,
-5538, 6001, -5575, 5967, -5612, 5933, -5648, 5898, -5685, 5863, -5721,
5828, -5756, 5792, -5792, 5756, -5828, 5721, -5863, 5685, -5898, 5648,
-5933, 5612, -5967, 5575, -6001, 5538, -6036, 5501, -6069, 5464, -6103,
5426, -6136, 5388, -6170, 5350, -6203, 5312, -6235, 5274, -6268, 5235,
-6300, 5196, -6332, 5157, -6364, 5118, -6395, 5079, -6427, 5039, -6458,
5000, -6488, 4960, -6519, 4920, -6549, 4879, -6579, 4839, -6609, 4798,
-6639, 4758, -6668, 4717, -6697, 4675, -6726, 4634, -6755, 4592, -6783,
4551, -6811, 4509, -6839, 4467, -6866, 4425, -6894, 4382, -6921, 4340,
-6947, 4297, -6974, 4254, -7000, 4211, -7026, 4168, -7052, 4124, -7077,
4081, -7102, 4037, -7127, 3994, -7152, 3950, -7176, 3905, -7200, 3861,
-7224, 3817, -7248, 3772, -7271, 3728, -7294, 3683, -7317, 3638, -7339,
3593, -7361, 3547, -7383, 3502, -7405, 3457, -7426, 3411, -7447, 3365,
-7468, 3319, -7489, 3273, -7509, 3227, -7529, 3181, -7549, 3134, -7568,
3088, -7587, 3041, -7606, 2995, -7624, 2948, -7643, 2901, -7661, 2854,
-7678, 2807, -7696, 2759, -7713, 2712, -7729, 2664, -7746, 2617, -7762,
2569, -7778, 2521, -7794, 2474, -7809, 2426, -7824, 2378, -7839, 2329,
-7853, 2281, -7867, 2233, -7881, 2184, -7895, 2136, -7908, 2087, -7921,
2039, -7934, 1990, -7946, 1941, -7958, 1892, -7970, 1843, -7981, 1794,
-7992, 1745, -8003, 1696, -8014, 1647, -8024, 1598, -8034, 1548, -8044,
1499, -8053, 1450, -8062, 1400, -8071, 1350, -8079, 1301, -8087, 1251,
-8095, 1202, -8103, 1152, -8110, 1102, -8117, 1052, -8124, 1002, -8130,
952, -8136, 902, -8142, 852, -8147, 802, -8152, 752, -8157, 702,
-8161, 652, -8165, 602, -8169, 552, -8173, 502, -8176, 452, -8179,
401, -8182, 351, -8184, 301, -8186, 251, -8188, 201, -8189, 150,
-8190, 100, -8191, 50, -8191, 0, -8191, -50, -8191, -100, -8191,
-150, -8190, -201, -8189, -251, -8188, -301, -8186, -351, -8184, -401,
-8182, -452, -8179, -502, -8176, -552, -8173, -602, -8169, -652, -8165,
-702, -8161, -752, -8157, -802, -8152, -852, -8147, -902, -8142, -952,
-8136, -1002, -8130, -1052, -8124, -1102, -8117, -1152, -8110, -1202, -8103,
-1251, -8095, -1301, -8087, -1350, -8079, -1400, -8071, -1450, -8062, -1499,
-8053, -1548, -8044, -1598, -8034, -1647, -8024, -1696, -8014, -1745, -8003,
-1794, -7992, -1843, -7981, -1892, -7970, -1941, -7958, -1990, -7946, -2039,
-7934, -2087, -7921, -2136, -7908, -2184, -7895, -2233, -7881, -2281, -7867,
-2329, -7853, -2378, -7839, -2426, -7824, -2474, -7809, -2521, -7794, -2569,
-7778, -2617, -7762, -2664, -7746, -2712, -7729, -2759, -7713, -2807, -7696,
-2854, -7678, -2901, -7661, -2948, -7643, -2995, -7624, -3041, -7606, -3088,
-7587, -3134, -7568, -3181, -7549, -3227, -7529, -3273, -7509, -3319, -7489,
-3365, -7468, -3411, -7447, -3457, -7426, -3502, -7405, -3547, -7383, -3593,
-7361, -3638, -7339, -3683, -7317, -3728, -7294, -3772, -7271, -3817, -7248,
-3861, -7224, -3905, -7200, -3950, -7176, -3994, -7152, -4037, -7127, -4081,
-7102, -4124, -7077, -4168, -7052, -4211, -7026, -4254, -7000, -4297, -6974,
-4340, -6947, -4382, -6921, -4425, -6894, -4467, -6866, -4509, -6839, -4551,
-6811, -4592, -6783, -4634, -6755, -4675, -6726, -4717, -6697, -4758, -6668,
-4798, -6639, -4839, -6609, -4879, -6579, -4920, -6549, -4960, -6519, -5000,
-6488, -5039, -6458, -5079, -6427, -5118, -6395, -5157, -6364, -5196, -6332,
-5235, -6300, -5274, -6268, -5312, -6235, -5350, -6203, -5388, -6170, -5426,
-6136, -5464, -6103, -5501, -6069, -5538, -6035, -5575, -6001, -5612, -5967,
-5648, -5933, -5685, -5898, -5721, -5863, -5756, -5828, -5792, -5792, -5828,
-5756, -5863, -5721, -5898, -5685, -5933, -5648, -5967, -5612, -6001, -5575,
-6036, -5538, -6069, -5501, -6103, -5464, -6136, -5426, -6170, -5388, -6203,
-5350, -6235, -5312, -6268, -5274, -6300, -5235, -6332, -5196, -6364, -5157,
-6395, -5118, -6427, -5079, -6458, -5039, -6488, -5000, -6519, -4960, -6549,
-4920, -6579, -4879, -6609, -4839, -6639, -4798, -6668, -4758, -6697, -4717,
-6726, -4675, -6755, -4634, -6783, -4592, -6811, -4551, -6839, -4509, -6866,
-4467, -6894, -4425, -6921, -4382, -6947, -4340, -6974, -4297, -7000, -4254,
-7026, -4211, -7052, -4168, -7077, -4124, -7102, -4081, -7127, -4037, -7152,
-3994, -7176, -3950, -7200, -3905, -7224, -3861, -7248, -3817, -7271, -3772,
-7294, -3728, -7317, -3683, -7339, -3638, -7361, -3593, -7383, -3547, -7405,
-3502, -7426, -3457, -7447, -3411, -7468, -3365, -7489, -3319, -7509, -3273,
-7529, -3227, -7549, -3181, -7568, -3134, -7587, -3088, -7606, -3041, -7624,
-2995, -7643, -2948, -7661, -2901, -7678, -2854, -7696, -2807, -7713, -2759,
-7729, -2712, -7746, -2664, -7762, -2617, -7778, -2569, -7794, -2521, -7809,
-2474, -7824, -2426, -7839, -2378, -7853, -2329, -7867, -2281, -7881, -2233,
-7895, -2184, -7908, -2136, -7921, -2087, -7934, -2039, -7946, -1990, -7958,
-1941, -7970, -1892, -7981, -1843, -7992, -1794, -8003, -1745, -8014, -1696,
-8024, -1647, -8034, -1598, -8044, -1548, -8053, -1499, -8062, -1450, -8071,
-1400, -8079, -1350, -8087, -1301, -8095, -1251, -8103, -1202, -8110, -1152,
-8117, -1102, -8124, -1052, -8130, -1002, -8136, -952, -8142, -902, -8147,
-852, -8152, -802, -8157, -752, -8161, -702, -8165, -652, -8169, -602,
-8173, -552, -8176, -502, -8179, -452, -8182, -401, -8184, -351, -8186,
-301, -8188, -251, -8189, -201, -8190, -150, -8191, -100, -8191, -50};
/* 1024 real values as input data in float format */
float fft_input[1024] = {
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f,
0.243f, 0.323f, 0.505f, -0.176f, -0.87f, 0.353f, -0.344f, -0.443f,
-0.434f, -0.32f, 0.232f, -0.454f, -0.32f, -0.323f, -0.733f, 0.54f};