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