1 /* ======================================================================= */
2 /* DSP_fft32x32s.h -- 32x32s Mixed Radix FFT */
3 /* Serial ASM Implementation */
4 /* */
5 /* Rev 0.0.1 */
6 /* */
7 /* */
8 /* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ */
9 /* */
10 /* */
11 /* Redistribution and use in source and binary forms, with or without */
12 /* modification, are permitted provided that the following conditions */
13 /* are met: */
14 /* */
15 /* Redistributions of source code must retain the above copyright */
16 /* notice, this list of conditions and the following disclaimer. */
17 /* */
18 /* Redistributions in binary form must reproduce the above copyright */
19 /* notice, this list of conditions and the following disclaimer in the */
20 /* documentation and/or other materials provided with the */
21 /* distribution. */
22 /* */
23 /* Neither the name of Texas Instruments Incorporated nor the names of */
24 /* its contributors may be used to endorse or promote products derived */
25 /* from this software without specific prior written permission. */
26 /* */
27 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
28 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
29 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
30 /* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
31 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
32 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
33 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
34 /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
35 /* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
36 /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
37 /* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
38 /* */
39 /* ======================================================================= */
41 #ifndef DSP_FFT32X32S_H_
42 #define DSP_FFT32X32S_H_ 1
44 #ifndef __TI_COMPILER_VERSION__ // for non TI compiler
45 #include "assert.h" // intrinsics prototypes
46 #include "C6xSimulator.h" // intrinsics prototypes
47 #include "C6xSimulator_type_modifiers.h" // define/undefine typing keywords
48 #endif
50 /** @ingroup FFT */
51 /* @{ */
53 /** @defgroup DSP_fft32x32s */
54 /** @ingroup DSP_fft32x32s */
55 /* @{ */
57 /**
58 * This routine computes an extended precision complex
59 * forward mixed radix FFT with scaling, rounding and
60 * digit reversal. Input data x[ ], output data y[ ],
61 * and coefficients w[ ] are 32-bit. The output is returned
62 * in the separate array y[ ] in normal order. Each complex
63 * value is stored with interleaved real and imaginary parts.
64 *
65 * @param ptr_w = input twiddle factors
66 * @param npoints = number of points
67 * @param ptr_x = transformed data reversed
68 * @param ptr_y = linear transformed data
69 *
70 * @par Algorithm:
71 * DSP_fft32x32s_cn.c is the natural C equivalent of the optimized
72 * intrinsic C code without restrictions. Note that the intrinsic
73 * C code is optimized and restrictions may apply.
74 *
75 * @par Assumptions:
76 * In-place computation is not allowed. <BR>
77 * Size of FFT, nx, must be power of 2 and 16<=nx<=65536. <BR>
78 * The arrays for the complex input data x[], complex output data y[]
79 * and twiddle factor w[] must be double word aligned. <BR>
80 * The input and output data are complex, with the real/imaginary
81 * components stored in adjacent locations in the array. The real
82 * components are stored at even array indices, and the imaginary
83 * components are stored at odd array indices. <BR>
84 * Allowed maximum absolute value of input is 2^(32 - (log2(nx)-ceil[log4(nx)-1])). <BR>
85 *
86 * @par Implementation Notes:
87 * Scaling is performed at each stage by shifting the results right by 1,
88 * preventing overflow.
89 *
90 * @b Endian Support:
91 * The intrinsic optimized C code supports both big and little endian modes. <BR>
92 * The linear assembly code supports little endian mode only. <BR>
93 * @b Interruptibility: The code is interruptible.
94 *
95 */
97 void DSP_fft32x32s (
98 const int * restrict ptr_w,
99 int npoints,
100 int * restrict ptr_x,
101 int * restrict ptr_y
102 );
104 #endif
106 /* ======================================================================== */
107 /* End of file: DSP_fft32x32s.h */
108 /* ------------------------------------------------------------------------ */
109 /* Copyright (c) 2011 Texas Instruments, Incorporated. */
110 /* All Rights Reserved. */
111 /* ======================================================================== */