Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define CM_CLKEN_PLL_MPU 0x48004904
- #define CM_CLKSEL1_PLL_MPU 0x48004940
- #define CM_CLKSEL2_PLL_MPU 0x48004944
- #define CM_IDLEST_PLL_MPU 0x48004924
- #define SRAM_PCHARGE 0x48307264
- #define CM_CLKSEL2_PLL_MPU_var (volatile unsigned int *)(CM_CLKSEL2_PLL_MPU)
- #define CM_CLKSEL1_PLL_MPU_var (volatile unsigned int *)(CM_CLKSEL1_PLL_MPU)
- #define CM_IDLEST_PLL_MPU_var (volatile unsigned int *)(CM_IDLEST_PLL_MPU)
- #define CM_CLKEN_PLL_MPU_var (volatile unsigned int *)(CM_CLKEN_PLL_MPU)
- #define SRAM_PCHARGE_var (volatile unsigned int *)(SRAM_PCHARGE)
- /* ----------------------------------------------------------------------
- ** Global defines
- ** ------------------------------------------------------------------- */
- /* Max FFT Length 1024 and double buffer for real and imag */
- #define TEST_LENGTH_SAMPLES (1024 * 2)
- #define TEST_COUNT 5000
- /* ----------------------------------------------------------------------
- ** Test input data for F32
- ** Generated by the MATLAB rand() function
- ** ------------------------------------------------------------------- */
- __align(256) static float testInput_f32[TEST_LENGTH_SAMPLES] =
- {
- -0.432565, 0.864397, -1.665584, 0.094203, 0.125332, -0.851909, 0.287676, 0.873504,
- -1.146471, -0.438039, 1.190915, -0.429661, 1.189164, -1.102729, -0.037633, 0.396247,
- 0.327292, -0.964925, 0.174639, 0.168449, -0.186709, -1.965359, 0.725791, -0.744302,
- -0.588317, -0.552307, 2.183186, -0.819726, -0.136396, 1.109142, 0.113931, -0.614946,
- 1.066768, -0.254635, 0.059281, -0.269830, -0.095648, -1.671994, -0.832349, -1.876045,
- 0.294411, 0.575006, -1.336182, -0.866133, 0.714325, -2.116523, 1.623562, -0.964466,
- -0.691776, 0.212729, 0.857997, 0.477917, 1.254001, 0.100658, -1.593730, 0.297433,
- -1.440964, 0.570148, 0.571148, -1.624496, -0.399886, 0.643443, 0.689997, 0.681861,
- 0.815622, 0.014655, 0.711908, -1.301541, 1.290250, -1.284587, 0.668601, 0.812213,
- 1.190838, 0.838548, -1.202457, 1.420321, -0.019790, -0.989752, -0.156717, -1.183229,
- -1.604086, -0.466259, 0.257304, -0.365943, -1.056473, 1.118333, 1.415141, -0.465615,
- -0.805090, -1.560800, 0.528743, -0.283103, 0.219321, -1.322941, -0.921902, -0.196238,
- -2.170674, 0.419039, -0.059188, 0.742318, -1.010634, -0.143032, 0.614463, -2.161943,
- 0.507741, -0.644226, 1.692430, 1.439590, 0.591283, -0.846917, -0.643595, 0.057340,
- 0.380337, 0.643408, -1.009116, -0.670431, -0.019511, -0.003142, -0.048221, 0.352931,
- 0.000043, 1.179502, -0.317859, -0.685902, 1.095004, 1.676789, -1.873990, -0.255309,
- 0.428183, -0.647548, 0.895638, -0.182214, 0.730957, 0.851800, 0.577857, -0.306550,
- 0.040314, -0.440529, 0.677089, -0.611472, 0.568900, -0.485207, -0.255645, 1.197019,
- -0.377469, 1.394788, -0.295887, 0.165368, -1.475135, -0.509967, -0.234004, 1.377717,
- 0.118445, 1.298518, 0.314809, -0.130117, 1.443508, 0.740249, -0.350975, 1.332017,
- 0.623234, -0.278071, 0.799049, -0.327993, 0.940890, -0.012527, -0.992092, 0.903179,
- 0.212035, -1.112463, 0.237882, -0.839211, -1.007763, 0.035534, -0.742045, -1.246529,
- 1.082295, 0.884505, -0.131500, 2.538334, 0.389880, 1.316795, 0.087987, 1.442213,
- -0.635465, 1.466919, -0.559573, -1.107052, 0.443653, -0.460936, -0.949904, -0.020296,
- 0.781182, -0.045998, 0.568961, -0.544487, -0.821714, 0.917035, -0.265607, -0.019418,
- -1.187777, 0.774630, -2.202321, -0.594053, 0.986337, 1.820276, -0.518635, 0.524719,
- 0.327368, 0.685938, 0.234057, -0.901304, 0.021466, 2.136023, -1.003944, 0.320126,
- -0.947146, -1.584119, -0.374429, -0.502514, -1.185886, 0.737926, -1.055903, -0.525392,
- 1.472480, -1.532115, 0.055744, -0.153786, -1.217317, -0.646732, -0.041227, -1.341450,
- -1.128344, 0.271534, -1.349278, 0.339541, -0.261102, 1.674580, 0.953465, 0.335636,
- 0.128644, -0.550556, 0.656468, -0.286507, -1.167819, -0.814791, -0.460605, 0.053508,
- -0.262440, -0.427841, -1.213152, 0.463860, -1.319437, 0.416588, 0.931218, 0.191634,
- 0.011245, -1.284328, -0.645146, -1.006709, 0.805729, 0.041786, 0.231626, -0.757276,
- -0.989760, 2.278871, 1.339586, -1.800414, 0.289502, 0.176299, 1.478917, -0.263794,
- 1.138028, -0.833888, -0.684139, 0.220767, -1.291936, -0.882230, -0.072926, 0.856510,
- -0.330599, -0.925690, -0.843628, -0.914070, 0.497770, -1.327629, 1.488490, 1.611727,
- -0.546476, -0.561827, -0.846758, 0.276041, -0.246337, -0.227653, 0.663024, 0.184183,
- -0.854197, 0.082830, -1.201315, 0.452035, -0.119869, 0.101411, -0.065294, -0.365760,
- 0.485296, -0.091035, -0.595491, 0.739457, -0.149668, 0.940328, -0.434752, -0.028961,
- -0.079330, -0.928710, 1.535152, 0.745038, -0.606483, 2.488098, -1.347363, 0.691925,
- 0.469383, -0.941710, -0.903567, 0.384997, 0.035880, -0.278887, -0.627531, -0.982944,
- 0.535398, 1.620751, 0.552884, -3.051825, -0.203690, -0.048454, -2.054325, 0.318202,
- 0.132561, -0.635514, 1.592941, -1.028736, 1.018412, 1.641380, -1.580402, 0.019495,
- -0.078662, -2.047269, -0.681657, -1.129305, -1.024553, -2.355586, -1.234353, -0.561249,
- 0.288807, -0.087973, -0.429303, 1.073777, 0.055801, -0.311909, -0.367874, -1.478774,
- -0.464973, -0.043979, 0.370961, -0.799868, 0.728283, -0.865158, 2.112160, -0.119007,
- -1.357298, -0.214830, -1.022610, 0.007315, 1.037834, -1.039472, -0.389800, 0.832836,
- -1.381266, -0.746695, 0.315543, 0.349276, 1.553243, 0.484013, 0.707894, -1.007859,
- 1.957385, 1.003469, 0.504542, -2.676089, 1.864529, 0.016822, -0.339812, -1.443245,
- -1.139779, 0.106502, -0.211123, -0.523471, 1.190245, 0.968581, -1.116209, -0.675762,
- 0.635274, -1.086512, -0.601412, 0.792917, 0.551185, 1.607967, -1.099840, -1.386200,
- 0.085991, 0.858656, -2.004563, 0.207575, -0.493088, 1.048865, 0.462048, -0.784071,
- -0.321005, -0.326146, 1.236556, -0.415365, -0.631280, -0.340785, -2.325211, 0.565016,
- -1.231637, 0.441829, 1.055648, -0.109207, -0.113224, 0.430549, 0.379224, 0.693041,
- 0.944200, -0.547589, -2.120427, 0.944736, -0.644679, -0.792557, -0.704302, 0.280168,
- -1.018137, -1.642974, -0.182082, 0.314746, 1.521013, 1.030286, -0.038439, 1.751701,
- 1.227448, -0.251608, -0.696205, 1.819214, 0.007524, 1.234399, -0.782893, -2.339612,
- 0.586939, -0.038625, -0.251207, 0.007293, 0.480136, -0.565029, 0.668155, 1.108257,
- -0.078321, 0.520474, 0.889173, -0.497671, 2.309287, -0.177898, 0.524639, 1.091016,
- -0.011787, 1.159731, 0.913141, 0.675004, 0.055941, 2.291756, -1.107070, -1.398845,
- 0.485498, -1.532820, -0.005005, 0.403012, -0.276218, -0.466509, 1.276452, 0.428272,
- 1.863401, -1.390515, -0.522559, -0.613866, 0.103424, -0.995531, -0.807649, -1.106047,
- 0.680439, 0.345156, -2.364590, 1.638406, 0.990115, -0.550912, 0.218899, 1.664607,
- 0.261662, -0.048037, 1.213444, 0.662008, -0.274667, -0.296988, -0.133134, 1.660689,
- -1.270500, 0.057131, -1.663606, -2.227418, -0.703554, 1.245199, 0.280880, -1.158628,
- -0.541209, 0.867397, -1.333531, -0.801315, 1.072686, -0.263610, -0.712085, 0.751058,
- -0.011286, 1.795228, -0.000817, 0.984351, -0.249436, 0.046669, 0.396575, 0.323443,
- -0.264013, 0.522442, -1.664011, -0.788527, -1.028975, 0.734071, 0.243095, 0.080416,
- -1.256590, -0.543988, -0.347183, 0.316257, -0.941372, -1.408710, -1.174560, 0.186814,
- -1.021142, -2.262433, -0.401667, 0.500375, 0.173666, -0.224826, -0.116118, -1.455474,
- 1.064119, -0.015503, -0.245386, -0.437796, -1.517539, 0.907150, 0.009734, 1.284133,
- 0.071373, -0.730091, 0.316536, -1.472669, 0.499826, -1.594354, 1.278084, 0.497586,
- -0.547816, 0.741050, 0.260808, -0.355039, -0.013177, -0.810574, -0.580264, 0.238212,
- 2.136308, 1.505073, -0.257617, -1.189561, -1.409528, -0.194823, 1.770101, 0.624787,
- 0.325546, -1.278067, -1.119040, 0.100259, 0.620350, -0.342182, 1.269782, -0.002015,
- -0.896043, -0.498406, 0.135175, 1.049755, -0.139040, -1.670559, -1.163395, -2.014370,
- 1.183720, 0.986616, -0.015430, -0.060483, 0.536219, 1.192941, -0.716429, 2.685580,
- -0.655559, 0.853734, 0.314363, 1.005549, 0.106814, -0.000982, 1.848216, -0.560458,
- -0.275106, -0.191396, 2.212554, -0.048913, 1.508526, 0.600460, -1.945079, -1.994642,
- -1.680543, -0.965134, -0.573534, -0.943199, -0.185817, -0.200671, 0.008934, 0.556167,
- 0.836950, 2.018381, -0.722271, 1.813736, -0.721490, -0.112448, -0.201181, -0.889976,
- -0.020464, -0.726843, 0.278890, 0.763502, 1.058295, -0.598514, 0.621673, 0.723730,
- -1.750615, -0.867938, 0.697348, 0.841673, 0.811486, -0.850938, 0.636345, 0.933427,
- 1.310080, 0.485960, 0.327098, -0.216203, -0.672993, -0.381497, -0.149327, -1.427041,
- -2.449018, -1.487669, 0.473286, -2.515103, 0.116946, -1.306210, -0.591104, -0.376950,
- -0.654708, -1.107504, -1.080662, 0.312778, -0.047731, -0.845240, 0.379345, 0.237598,
- -0.330361, -0.918767, -0.499898, 2.441691, -0.035979, 0.083121, -0.174760, 0.266263,
- -0.957265, -0.762727, 1.292548, -2.492805, 0.440910, -0.163872, 1.280941, 0.701879,
- -0.497730, -0.855063, -1.118717, 0.373834, 0.807650, -0.504156, 0.041200, -1.074581,
- -0.756209, -0.632952, -0.089129, 1.854859, -2.008850, 0.467423, 1.083918, 1.316068,
- -0.981191, 1.779038, -0.688489, -0.384638, 1.339479, 0.895129, -0.909243, 0.473642,
- -0.412858, -0.023571, -0.506163, 1.612449, 1.619748, 0.839672, 0.080901, 0.247906,
- -1.081056, -0.540454, -1.124518, -1.808434, 1.735676, -0.266203, 1.937459, 0.769024,
- 1.635068, 0.076724, -1.255940, 0.078595, -0.213538, 1.063096, -0.198932, 0.349197,
- 0.307499, 0.755430, -0.572325, -0.624003, -0.977648, -0.421374, -0.446809, 0.596029,
- 1.082092, -1.389987, 2.372648, -2.634668, 0.229288, -0.806934, -0.266623, 0.091930,
- 0.701672, 2.371014, -0.487590, -0.008736, 1.862480, 2.122155, 1.106851, -0.684231,
- -1.227566, -0.413033, -0.669885, -0.857683, 1.340929, 0.970899, 0.388083, -1.064209,
- 0.393059, 1.500750, -1.707334, -0.470707, 0.227859, 1.549526, 0.685633, 0.089955,
- -0.636790, -1.859541, -1.002606, -1.408604, -0.185621, 0.115434, -1.054033, -0.480661,
- -0.071539, 1.236739, 0.279198, -2.015435, 1.373275, 0.563520, 0.179841, -0.043520,
- -0.542017, 0.460448, 1.634191, 0.282654, 0.825215, 1.060032, 0.230761, 0.547056,
- 0.671634, 0.220117, -0.508078, -1.909701, 0.856352, 1.117189, 0.268503, -1.607931,
- 0.624975, -1.443700, -1.047338, -0.314551, 1.535670, 0.766433, 0.434426, 0.174865,
- -1.917136, 1.316849, 0.469940, 0.958586, 1.274351, 0.647691, 0.638542, 0.092485,
- 1.380782, -0.411274, 1.319843, 0.346629, -0.909429, -0.348980, -2.305605, -0.200402,
- 1.788730, 0.393261, 0.390798, -1.852647, 0.020324, 0.996919, -0.405977, -0.481047,
- -1.534895, -0.295456, 0.221373, -0.309043, -1.374479, -0.383007, -0.839286, 1.023837,
- -0.208643, 1.360480, 0.755913, -0.705832, 0.375734, -0.609368, -1.345413, -0.112009,
- 1.481876, 0.905851, 0.032736, -0.592901, 1.870453, 2.144165, -1.208991, 0.748569,
- -0.782632, -1.654092, -0.767299, -0.977911, -0.107200, -0.347368, -0.977057, -0.107734,
- -0.963988, -0.402626, -2.379172, -1.065617, -0.838188, 0.878523, 0.257346, 0.460551,
- -0.183834, -1.078622, -0.167615, 0.644741, -0.116989, 0.605399, 0.168488, 0.055073,
- -0.501206, -0.005505, -0.705076, -0.099485, 0.508165, -0.225578, -0.420922, -1.026005,
- 0.229133, -0.732352, -0.959497, -1.405453, -0.146043, -1.119476, 0.744538, 0.186157,
- -0.890496, -0.314564, 0.139062, -0.088767, -0.236144, -0.160919, -0.075459, -1.936278,
- -0.358572, 2.751755, -2.077635, 1.292404, -0.143546, -0.233895, 1.393341, -0.193140,
- 0.651804, -0.104019, -0.377134, -0.814926, -0.661443, -0.108576, 0.248958, -1.569143,
- -0.383516, 0.212114, -0.528480, 1.678775, 0.055388, 0.379010, 1.253769, -0.668419,
- -2.520004, 1.727974, 0.584856, 1.693388, -1.008064, -0.787045, 0.944285, -1.874471,
- -2.423957, 0.023853, -0.223831, 1.518454, 0.058070, 0.534477, -0.424614, -1.355467,
- -0.202918, 0.280923, -1.513077, 0.182100, -1.126352, -0.256567, -0.815002, 0.858411,
- 0.366614, 0.057070, -0.586107, -1.462498, 1.537409, -2.326166, 0.140072, 2.562645,
- -1.862767, -0.639321, -0.454193, 0.706010, -0.652074, 0.627374, 0.103318, -1.465271,
- -0.220632, 0.548954, -0.279043, 1.894620, -0.733662, 0.901939, -0.064534, -0.684842,
- -1.444004, -0.410065, 0.612340, -1.834344, -1.323503, -0.357176, -0.661577, -0.081545,
- -0.146115, -0.557160, 0.248085, -1.778299, -0.076633, 0.038674, 1.738170, 1.603402,
- 1.621972, 0.428308, 0.626436, -0.321679, 0.091814, 0.158667, -0.807607, -1.831225,
- -0.461337, 1.083138, -1.405969, -0.442318, -0.374530, 0.213002, -0.470911, -0.429068,
- 1.751296, 1.112692, 0.753225, 1.054038, 0.064989, 0.192183, -0.292764, -0.175647,
- 0.082823, 0.561421, 0.766191, 1.251021, 2.236850, -0.419377, 0.326887, -1.464906,
- 0.863304, -0.953308, 0.679387, 1.384259, 0.554758, -0.966553, 1.001630, -0.002071,
- 1.259365, 0.508627, 0.044151, 0.346342, -0.314138, -1.396941, 0.226708, 0.520130,
- 0.996692, -0.349830, 1.215912, 0.530292, -0.542702, -0.256369, 0.912228, -1.617286,
- -0.172141, 1.556859, -0.335955, 0.821068, 0.541487, 0.206095, 0.932111, -1.697353,
- -0.570253, -0.168337, -1.498605, 0.828194, -0.050346, 0.047643, 0.553025, -0.815924,
- 0.083498, 0.927294, 1.577524, 1.072150, -0.330774, 0.775039, 0.795155, -1.018418,
- -0.784800, -1.575652, -1.263121, 1.943766, 0.666655, 1.479345, -1.392632, 1.581105,
- -1.300562, -0.514692, -0.605022, -0.907108, -1.488565, 2.258803, 0.558543, 0.040773,
- -0.277354, 0.242866, -1.293685, -0.346606, -0.888435, 1.047313, -0.986520, -0.267101,
- -0.071618, -0.821778, -2.414591, 0.035640, -0.694349, 1.483087, -1.391389, 0.361272,
- 0.329648, 0.623759, 0.598544, -0.910249, 0.147175, -2.556832, -0.101439, 1.665057,
- -2.634981, -0.959581, 0.028053, -0.516870, -0.876310, -0.004631, -0.265477, -0.435447,
- -0.327578, 0.881754, -1.158247, 0.497467, 0.580053, -0.853947, 0.239756, 0.541670,
- -0.350885, 0.551414, 0.892098, -0.137816, 1.578299, -0.643850, -1.108174, -1.300456,
- -0.025931, -1.254519, -1.110628, 1.840194, 0.750834, -0.658852, 0.500167, -0.275497,
- -0.517261, 1.482824, -0.559209, -0.008348, -0.753371, 0.090242, 0.925813, -1.871995,
- -0.248520, -2.196485, -0.149835, -1.042585, -1.258415, 0.545135, 0.312620, -1.164465,
- 2.690277, 0.796787, 0.289696, -0.250295, -1.422803, -1.112213, 0.246786, -0.273161,
- -1.435773, -1.013451, 0.148573, 0.872165, -1.693073, -1.055581, 0.719188, 0.848015,
- 1.141773, 0.301299, 1.551936, -0.682287, 1.383630, -0.507902, -0.758092, -1.029466,
- 0.442663, -0.285836, 0.911098, -1.676208, -1.074086, -0.497489, 0.201762, -0.386898,
- 0.762863, 0.043459, -1.288187, -0.655169, -0.952962, -0.146682, 0.778175, 0.085724,
- -0.006331, -0.961628, 0.524487, 0.459634, 1.364272, -0.516323, 0.482039, -0.735290,
- -0.787066, 1.470784, 0.751999, 0.997273, -0.166888, 1.306983, -0.816228, 0.101254,
- 2.094065, 1.577574, 0.080153, 2.966203, -0.937295, -0.293681, 0.635739, 1.343905,
- 1.682028, -0.749792, 0.593634, -0.698793, 0.790153, -1.302117, 0.105254, -0.171760,
- -0.158579, 0.711281, 0.870907, -0.161837, -0.194759, 0.203779, 0.075474, 0.314225,
- -0.526635, 0.216177, -0.685484, 0.249631, -0.268388, -1.610941, -1.188346, -0.451156,
- 0.248579, -1.600001, 0.102452, -0.145813, -0.041007, 1.192038, -2.247582, 0.285689,
- -0.510776, 0.951135, 0.249243, -0.965380, 0.369197, -1.109424, 0.179197, -0.616816,
- -0.037283, -1.160418, -1.603310, 0.271828, 0.339372, -1.964992, -0.131135, -0.199710,
- 0.485190, 1.792235, 0.598751, -0.079401, -0.086031, 0.764729, 0.325292, 0.660399,
- -0.335143, -1.688575, -0.322449, -0.429974, -0.382374, 0.072841, -0.953371, 1.479787,
- 0.233576, -0.178427, 1.235245, -1.206583, -0.578532, 0.391987, -0.501537, -0.046549,
- 0.722864, 0.952528, 0.039498, 0.492656, 1.541279, 0.307890, -1.701053, -1.667987,
- -1.033741, 0.978541, -0.763708, -0.857147, 2.176426, -0.442284, 0.431612, 0.503775,
- -0.443765, -0.188553, 0.029996, -0.521717, -0.315671, 0.211892, 0.977846, -0.686392,
- 0.018295, -0.884268, 0.817963, -0.059569, 0.702341, -2.475835, -0.231271, 0.565874,
- -0.113690, -0.925429, 0.127941, -0.941007, -0.799410, -0.190420, -0.238612, 0.128090,
- -0.089463, -0.067882, -1.023264, 1.471262, 0.937538, 1.067682, -1.131719, 0.229875,
- -0.710702, -0.005993, -1.169501, -1.168195, 1.065437, -0.901779, -0.680394, 0.323208,
- -1.725773, -0.012327, 0.813200, 0.554138, 1.441867, 0.062695, 0.672272, -0.642997,
- 0.138665, -0.331304, -0.859534, -0.267175, -0.752251, -0.247761, 1.229615, 0.777400,
- 1.150754, 0.343907, -0.608025, 0.863760, 0.806158, 0.858534, 0.217133, 0.687307,
- -0.373461, -1.299311, -0.832030, 0.603825, 0.286866, -1.623527, -1.818892, -0.620491,
- -1.573051, 0.643601, 2.015666, -1.145666, -0.071982, 0.844191, 2.628909, -0.042906,
- -0.243317, -0.504335, 0.173276, -0.443272, 0.923207, 2.083052, -0.178553, 1.858875,
- -0.521705, 0.926594, 1.431962, 0.295415, -0.870117, -0.266329, 0.807542, 0.742388,
- -0.510635, -0.080934, 0.743514, 0.935612, 0.847898, -0.835204, -0.829901, -0.745189,
- 0.532994, 1.361685, 1.032848, -0.306150, -1.052024, 0.878438, 0.362114, -1.100646,
- -0.036787, -0.489116, -1.227636, -1.350240, -0.275099, 0.787780, -0.160435, 0.823409,
- -1.083575, -0.679319, -1.954213, 0.597177, -0.909487, -1.171166, -0.005579, 2.037004,
- -1.723490, -0.440698, 1.263077, -0.278440, -0.600433, 0.270728, -2.063925, 0.400994,
- 0.110911, 0.073894, 1.487614, -1.040991, 0.053002, -1.453535, 0.161981, 0.234838,
- -0.026878, 1.049677, 0.173576, 0.341401, 0.882168, -0.992679, 0.182294, -1.617417,
- 0.755295, -0.444344, 0.508035, -1.055734, 0.131880, -1.498971, 0.280104, 0.178499,
- -0.982848, -0.957286, -0.944087, 1.314400, -0.013058, 0.030501, 0.354345, 0.072074,
- -0.894709, 0.555023, 0.812111, -0.729819, 0.109537, 1.096371, 2.731644, 1.335793,
- 0.411079, 0.411439, -1.306862, 1.632891, 0.383806, 0.243401, 0.499504, -0.003108,
- -0.510786, -0.738833, 0.234922, -1.767899, -0.597825, 1.794224, 0.020771, 1.281544,
- 0.419443, 0.128371, 1.191104, -0.214895, 0.771214, -0.370359, -2.644222, -1.158590,
- 0.285430, -1.478329, 0.826093, -1.475635, -0.008122, 0.651251, 0.858438, -0.092348,
- 0.774788, -0.367252, 1.305945, 0.817150, 1.231503, 1.235605, 0.958564, 0.336264,
- -1.654548, 0.231398, -0.990396, 0.046288, 0.685236, -0.313591, -0.974870, -1.073320,
- -0.606726, -0.063315, 0.686794, 0.915108, 0.020049, -1.675039, 1.063801, 0.918174,
- -1.341050, 1.023589, 0.479510, -0.904933, -1.633974, -1.921451, -1.442665, -0.136733,
- 0.293781, 1.363955, -0.140364, 0.783375, -1.130341, 0.527358, -0.292538, -0.746975,
- -0.582536, 1.711351, -0.896348, -0.151251, 0.248601, 1.519014, -1.489663, -0.399837,
- 0.313509, -2.012764, -2.025084, 0.714259, 0.528990, -1.927481, 0.343471, -0.873411,
- 0.758193, -0.361042, -0.691940, -1.607898, 0.680179, -0.776993, -1.072541, -0.320873,
- 0.899772, -1.313487, -2.123092, -0.108506, 0.284712, -1.017612, -0.733323, 1.300697,
- -0.773376, 1.216150, 0.151842, -1.046754, -0.336843, 0.123953, 0.970761, -1.106525,
- -0.107236, 0.490938, 1.013492, -1.681596, -0.475347, -0.171544, 0.068948, 0.723101,
- 0.398592, -0.777245, 1.116326, -0.093156, 0.620451, 0.167638, -0.287674, -0.637968,
- -1.371773, -0.104036, -0.685868, 0.631968, 0.331685, -1.687695, -0.997722, -0.517832,
- 0.291418, 0.086520, 1.107078, 2.199959, 0.244959, 0.760919, 0.164976, -1.456448,
- 0.406231, -1.774895, 1.215981, 0.295850, 1.448424, 1.018757, -1.025137, -0.643993,
- 0.205418, -1.111593, 0.588882, 1.458524, -0.264024, 0.103186, 2.495318, -0.638423,
- 0.855948, -0.025377, -0.850954, -1.301284, 0.811879, 0.344693, 0.700242, -1.360544,
- 0.759938, 0.235772, -1.712909, 2.432551, 1.537021, -0.352882, -1.609847, -0.253408,
- 1.109526, -0.078679, -1.109704, -1.203886, 0.385469, 0.454205, 0.965231, 0.669661,
- 0.818297, -0.402472, 0.037049, 0.759026, -0.926012, 1.281841, -0.111919, 0.803598,
- -0.803030, -1.204083, -1.665006, -0.826183, -0.901401, -0.711036, 0.588350, 0.436303,
- 0.554159, 1.021926, -0.415173, -0.362657, 0.061795, -0.298298, 0.457432, 0.733463,
- 0.199014, 0.340668, 0.257558, -1.106307, 2.080730, -2.043328, -2.277237, -0.358905,
- 0.339022, 0.595400, 0.289894, 0.375452, 0.662261, 1.202134, -0.580860, 0.543575,
- 0.887752, 0.288461, 0.171871, -0.665957, 0.848821, -0.151442, 0.963769, -0.659762,
- 1.321918, -1.980876, -0.064345, -1.824813, 1.317053, -0.255301, 0.228017, -0.826776,
- -1.429637, 1.532493, -0.149701, 1.704903, -0.504968, -0.214990, -1.729141, 1.705440,
- -0.417472, 0.371870, -0.614969, -0.264290, 0.720777, 2.503227, 0.339364, 0.735706,
- 0.882845, -1.099957, 0.284245, -1.292489, -0.145541, 1.249176, -0.089646, 0.198285,
- 0.289161, -0.704900, 1.164831, 0.384689, 0.805729, -0.744461, -1.355643, -0.085510,
- 0.120893, -0.760827, -0.222178, 0.588159, 0.571732, -0.488786, -0.300140, -0.790720,
- 1.134277, 0.186925, -0.179356, 1.323236, -1.467067, -0.252240, 1.395346, 0.394448,
- 0.440836, 1.221421, 0.565384, -0.630894, -0.693623, -0.172785, 0.833869, 0.590400,
- -2.237378, 0.485708, 1.097644, -0.345472, -0.001617, 0.387311, -1.614573, 0.004570,
- -1.228727, 0.384520, 0.207405, -1.412140, 0.220942, -1.196011, -1.006073, 0.047957,
- -0.453067, 0.422308, 1.399453, 1.080871, -0.461964, -0.072034, 0.032716, -0.752875,
- 0.798783, -0.555757, 0.896816, -1.304965, 0.137892, -0.112053, -1.619146, 0.367034,
- -1.646606, -0.327046, 0.428707, -0.336445, -0.737231, -0.388655, 0.564926, 1.680910,
- -1.384167, 0.707246, 0.460268, 1.030518, 0.629384, 0.305059, 0.379847, -1.121984,
- -1.013330, -0.122902, -0.347243, -0.693724, 0.441912, 0.875911, -1.590240, -1.094234,
- -0.701417, 0.925002, -1.077601, -0.229572, 1.002220, 0.225260, 1.729481, -0.335907,
- 0.709032, 1.218315, -0.747897, -0.096137, 0.228862, 0.120568, -0.223497, 1.004884,
- -0.853275, -0.657371, 0.345627, 0.405173, 0.109764, 0.890271, -1.133039, 1.449045,
- -0.683124, 1.382923, -0.277856, 1.176089, 0.654790, -1.729798, -1.248394, 0.104649,
- -0.597539, -1.487626, -0.481813, -1.743067, 0.983372, -0.510919, 1.762121, -0.067293,
- 1.427402, -0.063941, 0.911763, -2.196356, 0.326823, 1.106144, 0.069619, 1.526127,
- -1.499763, -0.687166, -0.418223, 1.160927, -0.021037, -0.425076, 0.228425, -0.060661,
- -1.008196, -1.899981, -0.664622, 1.219038, 0.558177, 0.901112, -1.188542, 0.823237,
- -0.775481, 1.882210, 0.271042, 0.238406, 1.534976, -0.429217, -1.052283, -1.797562,
- 0.625559, 1.467291, -0.797626, 1.030351, -0.313522, 0.892838, -0.602210, 1.395587,
- 1.259060, 0.416488, 0.858484, 1.545120, -2.105292, 0.664929, -0.360937, 0.706299,
- 0.553557, 2.759293, -1.556384, -0.051700, -0.206666, -0.839668, -0.425568, 1.555326,
- 0.493778, 0.149258, -0.870908, -1.684651, 0.079828, -0.569951, -0.521619, 0.488593,
- -1.413861, -0.029233, -0.384293, -2.238255, -0.457922, -2.117238, -0.291471, 0.152666,
- -0.301224, -1.353589, -1.588594, -0.206453, 1.094287, -1.204119, 1.324167, -0.436854,
- -0.126480, 0.047149, -0.737164, 2.478964, 0.213719, -1.288683, -0.400529, 0.565879,
- 0.064938, -0.489134, -1.757996, 0.571975, 1.686748, -0.533281, 0.327400, 0.764733,
- 0.715967, -1.748576, 1.598648, -0.729925, -2.064741, -0.004472, -0.743632, 0.535993,
- 0.176185, -0.021122, 0.527839, -0.669683, -0.553153, -0.056435, 0.298280, -0.213079,
- -1.226607, 0.432893, -0.189676, -0.065721, -0.301713, -2.272297, 0.956956, -1.046249,
- -0.533366, -0.478385, -0.901082, -0.765758, -0.892552, -0.093739, 0.278717, -1.139068,
- -0.745807, -0.691504, 1.603464, -3.596550, 0.574270, 0.463068, 0.320655, -1.966329,
- -0.151383, 1.222704, 0.315762, 0.237313, 1.343703, -1.015985, -2.237832, 0.640365
- };
- /* ----------------------------------------------------------------------
- ** Defines each of the tests performed
- ** ------------------------------------------------------------------- */
- typedef struct
- {
- int fftSize;
- int ifftFlag;
- int doBitReverse;
- float *inputF32;
- } test_config_cfft;
- /**
- * @brief Instance structure for the floating point CFFT/CIFFT function.
- */
- typedef struct
- {
- int fft_len; /**< Length of the FFT. */
- int ifft_flag; /**< Flag for selection of CFFT/ICFFT */
- int bit_reverse_flag; /**< Flag for selection of bitreversal or not */
- float *p_twiddle; /**< Points to the twiddle factors array. The array is of length 2 * MaxFFTSize. */
- int *p_bit_rev_table; /**< Points to the bit reversal array. The array is of size MaxFFTSize/4 */
- int twid_coef_modifier; /**< Modifier to support different FFT sizes with same twiddle table */
- int bit_rev_factor; /**< Modifier to support different FFT sizes with same bit reversal table */
- float one_by_fft_len; /**< 1/(Length of the FFT). */
- } ne10_cfft_radix4_instance_f32_t;
- static test_config_cfft CONFIG_CFFT[] =
- {
- {1024, 0, 0, &testInput_f32[0]},
- };
- #define CFFT_NUM_TESTS (sizeof(CONFIG_CFFT) / sizeof(CONFIG_CFFT[0]) )
- //static float in_c[TEST_LENGTH_SAMPLES] = {0};
- __align(256) static float in_neon[TEST_LENGTH_SAMPLES] = {0};
- //static float out_c[TEST_LENGTH_SAMPLES] = {0};
- __align(256) static float out_neon[TEST_LENGTH_SAMPLES] = {0};
- static int j=0;
- void main()
- {
- float *p_src = testInput_f32;
- ne10_cfft_radix4_instance_f32_t S;
- int loop = 0;
- int k = 0;
- int i = 0;
- int pos = 0;
- test_config_cfft *config;
- enable_caches();
- // UNLOCKING THE pll
- *CM_CLKEN_PLL_MPU_var= 0x35;
- while (*CM_IDLEST_PLL_MPU_var & 0x00);
- //// clksel1= 12580c for 600Mhz
- //// clksel1= 112c0c for 300Mhz
- //// clksel1= 10640c for 100Mhz
- //// clksel1= 10320c for 50Mhz
- *CM_CLKSEL1_PLL_MPU_var=0x10320c;
- *CM_CLKSEL2_PLL_MPU_var=0x01;
- *CM_CLKEN_PLL_MPU_var= 0x37;
- while (*CM_IDLEST_PLL_MPU_var & 0x01);
- for (loop = 0; loop < CFFT_NUM_TESTS; loop++)
- {
- config = &CONFIG_CFFT[loop];
- /* Initialize the CFFT/CIFFT module */
- ne10_cfft_radix4_init_float (&S, config->fftSize, config->ifftFlag);
- /* copy input to input buffer and clear the output buffer */
- for (i = 0; i < 2 * config->fftSize; i++)
- {
- // in_c[i] = testInput_f32[i];
- in_neon[i] = testInput_f32[i];
- }
- /* FFT test */
- start_perfmon();
- // ne10_radix4_butterfly_float_c (out_c, in_c, S.fft_len, S.p_twiddle);
- ne10_radix4_butterfly_float_neon (out_neon, in_neon, S.fft_len, S.p_twiddle);
- j=stop_perfmon();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment