[Dspforum] bit_reversal index creation for DSPlib complex bitreversal
Doug Wenstrand
doug at echelonembedded.com
Thu Oct 16 05:55:02 MDT 2008
A note which will hopefully save some confusion.
In the TI DSPLIB programmer's reference, there is a function for
bit_reversal, to be used after the FFT to put things in normal order. The
speed of this function depends on a pre-created table, which is created by
some C code which they put in the document itself. The comment for that
code is wrong.
/* −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− */
/* This routine calculates the index for bit reversal of */
/* an array of length nx. The length of the index table is */
/* 2^(2*ceil(k/2)) where nx = 2^k. */
/* */
/* In other words, the length of the index table is: */
/* − for even power of radix: sqrt(nx) */
/* − for odd power of radix: sqrt(2*nx) */
/* −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− */
These statements are inconsistant -- how long is the index table?
Is it 2^14 (16384)
or
sqrt(16384) = 128
*** for our 8192 point FFT the table is 128 long.
Of course, allocating it for 16384 would be safe, but wasteful
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://echelonembedded.com/pipermail/dspforum_echelonembedded.com/attachments/20081016/97f5e671/attachment.html>
More information about the Dspforum
mailing list