⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fft32_mac.s.list

📁 freescale MAC DSP的算法库(FFT
💻 LIST
📖 第 1 页 / 共 5 页
字号:
0x00000dc0: 73b5ebd0c945dfec                    .long        1941302224,-918167572,1946899450,-906238681,1952423376, 
            740b53fac9fbe527
            745f9dd0        
0x00000dd4: cab26fa974b2c883                    .long        -894275671,1957873795,-882278992,1963250501,-870249096, 
            cb697db07504d345
            cc210d78        
0x00000de8: 7555bd4bccd91d3d                    .long        1968553291,-858186435,1973781967,-846091464,1978936330, 
            75a585cfcd91ab38
            75f42c0a        
0x00000dfc: ce4ab5a27641af3c                    .long        -833964638,1984016188,-821806414,1989021349,-809617249, 
            cf043ab2768e0ea5
            cfbe389f        
0x00000e10: 76d94988d078ad9d                    .long        1993951624,-797397603,1998806829,-785147935,2003586779, 
            77235f2dd13397e1
            776c4edb        
0x00000e24: d1eef59e77b417df                    .long        -772868706,2008291295,-760560380,2012920200,-748223419, 
            d2aac50477fab988
            d3670445        
0x00000e38: 78403328d423b190                    .long        2017473320,-735858288,2021950483,-723465452,2026351521, 
            78848413d4e0cb14
            78c7aba1        
0x00000e4c: d59e4efe7909a92c                    .long        -711045378,2030676268,-698598533,2034924561,-686125387, 
            d65c3b7b794a7c11
            d71a8eb5        
0x00000e60: 798a23b1d7d946d7                    .long        2039096241,-673626409,2043191149,-661102069,2047209133, 
            79c89f6dd898620b
            7a05eead        
0x00000e74: d957de7a7a4210d8                    .long        -648552838,2051150040,-635979190,2055013723,-623381598, 
            da17ba4a7a7d055b
            dad7f3a2        
0x00000e88: 7ab6cba3db9888a8                    .long        2058800035,-610760536,2062508835,-598116479,2066139983, 
            7aef6323dc597781
            7b26cb4f        
0x00000e9c: dd1abe517b5d039d                    .long        -585449903,2069693341,-572761286,2073168777,-560051104, 
            dddc5b3a7b920b89
            de9e4c60        
0x00000eb0: 7bc5e28fdf608fe3                    .long        2076566159,-547319837,2079885360,-534567963,2083126254, 
            7bf88830e02323e5
            7c29fbee        
0x00000ec4: e0e606847c5a3d4f                    .long        -521795964,2086288719,-509004319,2089372637,-496193510, 
            e1a935e17c894bdd
            e26cb01a        
0x00000ed8: 7cb72724e330734c                    .long        2092377892,-483364020,2095304369,-470516331,2098151959, 
            7ce3ceb1e3f47d95
            7d0f4217        
0x00000eec: e4b8cd107d3980ec                    .long        -457650928,2100920556,-444768294,2103610053,-431868915, 
            e57d5fda7d628ac5
            e642340d        
0x00000f00: 7d8a5f3fe70747c3                    .long        2106220351,-418953277,2108751351,-406021865,2111202958, 
            7db0fdf7e7cc9917
            7dd6668e        
0x00000f14: e89226217dfa98a7                    .long        -393075167,2113575079,-380113669,2115867625,-367137861, 
            e957ecfb7e1d93e9
            ea1debbb        
0x00000f28: 7e3f57feeae4207a                    .long        2118080510,-354148230,2120213651,-341145266,2122266966, 
            7e5fe493ebaa894e
            7e7f3956        
0x00000f3c: ec71244f7e9d55fc                    .long        -328129457,2124240380,-315101295,2126133817,-302061269, 
            ed37ef917eba3a39
            edfee92b        
0x00000f50: 7ed5e5c6eec60f31                    .long        2127947206,-289009871,2129680479,-275947592,2131333571, 
            7ef0585fef8d5fb8
            7f0991c3        
0x00000f64: f054d8d47f2191b3                    .long        -262874924,2132906419,-249792358,2134398965,-236700388, 
            f11c789a7f3857f5
            f1e43d1c        
0x00000f78: 7f4de450f2ac246d                    .long        2135811152,-223599507,2137142927,-210490207,2138394239, 
            7f62368ff3742ca1
            7f754e7f        
0x00000f8c: f43c53ca7f872bf2                    .long        -197372982,2139565042,-184248326,2140655292,-171116733, 
            f50497fa7f97cebc
            f5ccf743        
0x00000fa0: 7fa736b4f6956fb6                    .long        2141664948,-157978698,2142593970,-144834715,2143442326, 
            7fb563b2f75dff65
            7fc25596        
0x00000fb4: f826a4617fce0c3e                    .long        -131685279,2144209982,-118530885,2144896909,-105372029, 
            f8ef5cbb7fd8878d
            f9b82683        
0x00000fc8: 7fe1c76bfa80ffcb                    .long        2145503083,-92209205,2146028479,-79042910,2146473079, 
            7fe9cbbffb49e6a2
            7ff09477        
0x00000fdc: fc12d9197ff62182                    .long        -65873639,2146836866,-52701887,2147119825,-39528152, 
            fcdbd5417ffa72d1
            fda4d928        
0x00000ff0: 7ffd885afe6de2e0                    .long        2147321946,-26352928,2147443222,-13176712 
            7fff6216ff36f078
                                                .section     .text,4,c        ; Locate the code in the ".dsp32code" section.
                                                .align       4                
                                                .xdef        _init_data       
                                                .xdef        _fft32_mac       
                                                .xdef        _inv_fft32_mac   
                             ;******************************************************************************
                             ;Store initial data
                             ;******************************************************************************
                             ;Stores initial data into ReX[] buffer.
                             ;ImX[] buffer contains zeros.
                             ;******************************************************************************
                             _init_data                                       
0x00000000: 4cef03000004                        movem.l      (4,a7),a0-a1     
0x00000006: 223c00000000                        move.l       #0,d1            
0x0000000c: 243c00000000                        move.l       #0,d2            
0x00000012: 20c2             nexx               move.l       d2,(a0)+         
0x00000014: 22c1                                move.l       d1,(a1)+         
0x00000016: 5282                                addq.l       #1,d2            
0x00000018: 0c8200000400                        cmp.l        #1024,d2         
0x0000001e: 65f2                                bcs.b        nexx             
0x00000020: 4e75                                rts                           
                             ;******************************************************************************
                             ;Bit reversal sorting
                             ;******************************************************************************
                             ;Sorts the samples in ReX[] and Imx[] using bit reversal address mode
                             ;******************************************************************************
                             ;Corresponding C code:
                             ;
                             ;	void RevSort(void){
                             ;	short i,j,k,n=1024,nm1=n-1,nd2=n>>1;
                             ;	float tr,ti;
                             ;
                             ;	j=nd2;
                             ;	for (i=1;i<=n-2;i++){
                             ;		if (i<j){
                             ;			tr=ReX[j];
                             ;			ti=ImX[j];
                             ;			ReX[j]=ReX[i];
                             ;			ImX[j]=ImX[i];
                             ;			ReX[i]=tr;
                             ;			ImX[i]=ti;
                             ;	  	}
                             ;		k=nd2;
                             ; 		while (k<=j){
                             ;			j=j-k;
                             ;			k=k>>1;
                             ; 		}
                             ;  		j=j+k;
                             ;	}
                             ;
                             ;	}
                             _rev_addr_sort                                   
0x00000022: 4cef03000004                        movem.l      (4,a7),a0/a1     ;load start addresses of ReX and ImX buffers
                                                                              ;to a0 and a1 registers
0x00000028: 243c00000400                        move.l       #1024,d2         ;store nd2*4 into d2 register (d2 is j)
                                                                              ;'4' is the size of one sample (4 bytes)
0x0000002e: 7204                                moveq.l      #4,d1            ;d1 is i
                             for                                              ;for (i=1;i<=n-2;i++){
0x00000030: b282                                cmp.l        d2,d1            ;if (i<j){
0x00000032: 641c                                bcc.b        jk               
0x00000034: 45f01800                            lea          (a0,d1.l),a2     ;add index j to the beginning address of buffer ReX
                                                                              ;and store it into a2
0x00000038: 47f11800                            lea          (a1,d1.l),a3     ;add index j to the beginning address of buffer ImX
                                                                              ;and store it into a3
0x0000003c: 26302800                            move.l       (a0,d2.l),d3     ;tr=ReX[j];
0x00000040: 28312800                            move.l       (a1,d2.l),d4     ;ti=ImX[j];
0x00000044: 21922800                            move.l       (a2),(a0,d2.l)   ;ReX[j]=ReX[i];
0x00000048: 23932800                            move.l       (a3),(a1,d2.l)   ;ImX[j]=ImX[i];
0x0000004c: 2483                                move.l       d3,(a2)          ;ReX[i]=tr;
0x0000004e: 2684                                move.l       d4,(a3)          ;ImX[i]=ti;
                             jk                                               
0x00000050: 203c00000400                        move.l       #1024,d0         ;d0 is k, k=nd2*4
                                                                              ;'4' is the size of one sample (4 bytes);

0x00000056: b480                                cmp.l        d0,d2            ;while (k<=j){
0x00000058: 6508                                bcs.b        j                
0x0000005a: 9480             while              sub.l        d0,d2            ;j=j-k;
0x0000005c: e288                                lsr.l        #1,d0            ;k=k>>1;
0x0000005e: b480                                cmp.l        d0,d2            
0x00000060: 64f8                                bcc.b        while            
                             j                                                
0x00000062: d480                                add.l        d0,d2            ;j=j+k;
0x00000064: 5881                                addq.l       #4,d1            
0x00000066: 0c81000007fc                        cmp.l        #2044,d1         
0x0000006c: 65c2                                bcs.b        for              
0x0000006e: 4e75                                rts                           
                             ;**********************************************************************************
                             ;Real FFT
                             ;**********************************************************************************
                             ;Upon entry, ReX[ ] contains the real input signal, while values in ImX[ ] are
                             ;ignored.
                             ;Upon return, ReX[ ] and ImX[ ] contain the DFT output.
                             ;All signals run from 0 to 1023.
                             ;**********************************************************************************
                             _fft32_mac                                       
0x00000070: 4fefffb8                            lea          -72(a7),a7       
0x00000074: 48d77fff                            movem.l      d0-d7/a0-a6,(a7) ;store contents of all registers into stack
                                                                              ;Corresponding C code:		;separate even and odd points
                                                                              ;for (i=0;i<512;i++){
                                                                              ;    ReX[i]=ReX[2*i];
                                                                              ;    ImX[i]=ReX[2*i+1];
                                                                              ;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -