📄 bit_reverse.lst
字号:
C51 COMPILER V8.02 BIT_REVERSE 05/09/2008 16:27:08 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE BIT_REVERSE
OBJECT MODULE PLACED IN Bit_Reverse.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Bit_Reverse.c BROWSE DEBUG OBJECTEXTEND
line level source
1
2
3 #include "FFT_Code_Tables.h"
4 //-----------------------------------------------------------------------------
5 // Bit_Reverse
6 //-----------------------------------------------------------------------------
7 //
8 // Sorts data in Bit Reversed Address order
9 //
10 // The BRTable[] array is used to find which values must be swapped. Only
11 // half of this array is stored, to save code space. The second half is
12 // assumed to be a mirror image of the first half.
13 //
14 void Bit_Reverse(int BR_Array[])
15 {
16 1
17 1 #if (NUM_FFT >= 512)
unsigned int swapA, swapB, sw_cnt; // Swap Indices
#endif
20 1
21 1 #if (NUM_FFT <= 256)
22 1 unsigned char swapA, swapB, sw_cnt; // Swap Indices
23 1 #endif
24 1
25 1 int TempStore;
26 1
27 1 // Loop through locations to swap
28 1 for (sw_cnt = 1; sw_cnt < NUM_FFT/2; sw_cnt++)
29 1 {
30 2 swapA = sw_cnt; // Store current location
31 2 swapB = BRTable[sw_cnt] * 2; // Retrieve bit-reversed index
32 2 if (swapB > swapA) // If the bit-reversed index is
33 2
34 2 { // larger than the current index,
35 3 TempStore = BR_Array[swapA]; // the two data locations are
36 3 BR_Array[swapA] = BR_Array[swapB]; // swapped. Using this comparison
37 3 BR_Array[swapB] = TempStore; // ensures that locations are only
38 3 } // swapped once, and never with
39 2 // themselves
40 2
41 2 swapA += NUM_FFT/2; // Now perform the same operations
42 2 swapB++; // on the second half of the data
43 2 if (swapB > swapA)
44 2 {
45 3 TempStore = BR_Array[swapA];
46 3 BR_Array[swapA] = BR_Array[swapB];
47 3 BR_Array[swapB] = TempStore;
48 3 }
49 2 }
50 1
51 1 } // END Bit Reverse Order Sort
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 197 ----
C51 COMPILER V8.02 BIT_REVERSE 05/09/2008 16:27:08 PAGE 2
CONSTANT SIZE = 512 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 6
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -