?? cfft32m.lst
字號:
TMS320C2000 COFF Assembler PC Version 3.06 Fri Nov 07 10:50:05 2003
Tools Copyright (c) 1996-2002 Texas Instruments Incorporated
cfft32m.asm PAGE 1
1 ;============================================================================
2 ;
3 ; File Name : cfft_magc.asm
4 ;
5 ; Originator : Advanced Embeeded Control
6 ; Texas Instruments
7 ;
8 ; Description : This file contains source code to compute the magnitude square of
9 ; complex spectral bins for complex FFT outputs.
10 ;
11 ; Date : 26/2/2002 (dd/mm/yyyy)
12 ;===========================================================================
13 ; Routine Type : C Callable
14 ;
15 ; Description :
16 ; void FFTC_mag(FFTxxxC_handle)
17 ; This function computes the magnitude square of complex FFT outputs. Allows in-place
18 ; and off-place storage of the magnitude square results.
19 ;
20 ;======================================================================
21 ; COMPLEX FFT MODULES
22 ;----------------------------------------------------------------------
23 ;typedef struct {
24 ; long *ipcbptr;
25 ; long *tfptr
26 ; int size;
27 ; int nrstage;
28 ; long *magptr;
29 ; long *winptr;
30 ; long peakmag;
31 ; int peakfrq;
32 ; void (*init)(void);
33 ; void (*izero)(void *);
34 ; void (*calc)(void *);
35 ; void (*mag)(void *);
36 ; void (*win)(void *);
37 ; }CFFT32;
38 ;======================================================================
39
40 .def _CFFT32_mag
41
42 00000000 _CFFT32_mag:
43 00000000 3B01 SETC SXM
44
45 00000001 C5C4 MOVL XAR7,*XAR4 ; XAR5=ipcbptr
46 00000002 C4F4 MOVL XAR6,*+XAR4[6] ; XAR6=magptr
47
48 00000003 58E4 MOVZ AR0,*+XAR4[4] ; AR7=size
49 00000004 D881 SUBB XAR0,#1 ; AR0=size-1
50
51 00000005 MAG_LP:
52 00000005 5633 ZAPA ; ACC=0, P=0
53 00000006 564F QMACL P,*XAR7,*XAR7++ ; Q15*Q15=Q30
00000007 87C7
54 00000008 564F QMACL P,*XAR7,*XAR7++ ; Q15*Q15+Q30=Q30
TMS320C2000 COFF Assembler PC Version 3.06 Fri Nov 07 10:50:05 2003
Tools Copyright (c) 1996-2002 Texas Instruments Incorporated
cfft32m.asm PAGE 2
00000009 87C7
55 0000000a 07AB ADDL ACC,P
56 0000000b 1E86 MOVL *XAR6++,ACC ; Store in Q30
57 0000000c 0008 BANZ MAG_LP,AR0--
0000000d FFF9
58
59 ; Find maximum magnitude
60 0000000e DC04 ADDB XAR4,#4 ; XAR4->size
61 0000000f 0200 MOVB ACC,#0
62 00000010 1EF4 MOVL *+XAR4[6],ACC ; peakmag=0
63 00000011 58C4 MOVZ AR0,*XAR4 ; AR0=size
64 00000012 83D4 MOVL XAR5,*+XAR4[2] ; XAR5=magptr
65
66 00000013 FF20 MOV ACC,#0
00000014 0000
67 00000015 D881 SUBB XAR0,#1 ; AR0=size-1
68
69 ;Find the maximum value among the FFT Magnitudes
70 00000016 F7A0 RPT AR0
71 00000017 5661 || MAXL ACC,*XAR5++
00000018 0085
72
73 00000019 1EF4 MOVL *+XAR4[6],ACC ; update peak magnitude
74 0000001a B600 MOVB XAR7,#0 ; XAR7=0
75 0000001b 83D4 MOVL XAR5,*+XAR4[2] ; XAR5=magptr
76 ;Find the spectral bin corresponding to maximum magnitude.
77 0000001c NEXT_BIN:
78 0000001c 5661 MAXL ACC,*XAR5++
0000001d 0085
79 0000001e 7787 NOP *XAR7++
80 0000001f EDFD SBF NEXT_BIN,NEQ
81
82 00000020 778F NOP *--XAR7
83 00000021 DC08 ADDB XAR4,#8 ; XAR4->peakfrq
84 00000022 7FC4 MOV *XAR4,AR7 ; update peak magnitude
85 00000023 0006 LRETR
86
No Assembly Errors, No Assembly Warnings
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -