
Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
|
Hi all, I'm using "cfftr2.asm" for 6711 routine to perform N-point complex FFT on 2N-point real sequence. It work's fine, I can perform FFT and IFFT (with "icfftr2.asm") and gets the same sequence. But in my application I need only FFT to buildup a power spectrum. For that I have to split 2N-point real sequence after N-point complex FFT. How I can do that? I'm not so good at math, so any C sample code should be of interest. Thanks, Veniamin |
|
|
|
Hi Veniamin, I had to do the same thing. Refer to this Application Report SPRA291. It provides a good background explanation as well as C code examples. The C sample starts on pg 43. Though intended for fix-point, you should be able to use it for floating point (just ignore all that scaling by (16383.0)stuff. The Split function will not the fix-piont stuff (Tr>>15) stuff. Let me know if you don't get it working. /Khalid |
|
> Date: Thu, 18 Apr 2002 11:46:40 -0400 > From: > Subject: Re: How to split 2N-point real sequence after N-point complex FFT > > Hi Veniamin, > I had to do the same thing. Refer to this Application Report SPRA291. > It provides a good background explanation as well as C code examples. > The C sample starts on pg 43. Though intended for fix-point, you should > be able to use it for floating point (just ignore all that scaling by > (16383.0)stuff. The Split function will not the fix-piont stuff > (Tr>>15) stuff. That's a helluva lot of computational workload, a whole buch of calls to sin() and cos() in the loop. I'd use a canned real FFT described by Sorensen in ASSP-35 No 6, pp. 849-864, June 1987. I also have it optimized for C67xx DSPs. Rgds, Andrew > Let me know if you don't get it working. > /Khalid |
|
In a message dated 4/19/2002 7:38:39 PM Eastern Daylight Time, writes: > > Date: Thu, 18 Apr 2002 11:46:40 -0400 > > From: > > Subject: Re: How to split 2N-point real sequence after N-point complex > FFT > > > > Hi Veniamin, > > I had to do the same thing. Refer to this Application Report SPRA291. > > It provides a good background explanation as well as C code examples. > > The C sample starts on pg 43. Though intended for fix-point, you should > > be able to use it for floating point (just ignore all that scaling by > > (16383.0)stuff. The Split function will not the fix-piont stuff > > (Tr>>15) stuff. > > That's a helluva lot of computational workload, a whole buch of calls to > sin() and cos() in the loop. I'd use a canned real FFT described by > Sorensen in ASSP-35 No 6, pp. 849-864, June 1987. I also have it > optimized for C67xx DSPs. > > Rgds, > Andrew > > > Let me know if you don't get it working. > > /Khalid > The sine and cosine values would be precalculated and stored in a lookup tables. Calling them inline, as you mentioned, would be inefficient. Viniamin's issue is the size of the table for these sine/cosine functions is taking too much memory. (I briefly looked into that and it does look solvable by reusing the Radix-2 Complex FFT sine/cosine table). I have used the Real FFT that you mentioned in my C31 projects. I did write C67x version of that in C and, with more effort, an optimized version in assembly would be nice to have. However, my guess is that it would be very close, in the end, because you are executing a complex FFT that's half the size of the "Real" FFT. Yes there is overhead in the Split function, but if done right it can yield cycle count very close to the Sorensen type FFT. Regards, /Khalid |