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

📄 fir32_emac.s.list

📁 freescale MAC DSP的算法库(FFT
💻 LIST
📖 第 1 页 / 共 3 页
字号:
                             ;************************************************************************
                             ;*
                             ;* Copyright:
                             ;*	Freescale Semiconductor, INC. All Rights Reserved.  
                             ;*  You are hereby granted a copyright license to use, modify, and
                             ;*  distribute the SOFTWARE so long as this entire notice is
                             ;*  retained without alteration in any modified and/or redistributed
                             ;*  versions, and that such modified versions are clearly identified
                             ;*  as such. No licenses are granted by implication, estoppel or
                             ;*  otherwise under any patents or trademarks of Freescale Semiconductor, 
                             ;*  Inc. This software is provided on an "AS IS" basis and without warranty.
                             ;*
                             ;*  To the maximum extent permitted by applicable law, FREESCALE 
                             ;*  DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING 
                             ;*  IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
                             ;*  PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE 
                             ;*  SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY 
                             ;*  ACCOMPANYING WRITTEN MATERIALS.
                             ;* 
                             ;*  To the maximum extent permitted by applicable law, IN NO EVENT
                             ;*  SHALL FREESCALE BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING 
                             ;*  WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS 
                             ;*  INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY
                             ;*  LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.   
                             ;* 
                             ;*  Freescale assumes no responsibility for the maintenance and support
                             ;*  of this software
                             ;**********************************************************************
                             ;* FILENAME: fir32.s
                             ;*
                             ;* PURPOSE: FIR32 module source file, containing functions for allocating/deallocating 
                             ;*	        data structures for filter and computing a Finite Impulse
                             ;*	        Responce filter.
                             ;*
                             ;* AUTHOR: original code was written by Andrey Butok,
                             ;*		   optimized for eMAC unit by Dmitriy Karpenko	        
                             ;*********************************************
                                                .section     .text            ;-=Locate the code in the ".text" section.=-
                             ;#define __EMAC_H
                             ;#include "emac.h"
                                                .align       4                
                                                .xdef        _FIR32_EMAC      
                             ;******************************************************
                             ;* NAME: void FIR32( struct tIirStruct *pIIR, Frac32* pX, Frac32* pY, unsigned int n)
                             ;*
                             ;* DESCRIPTION: Computes a Finite Impulse Response (FIR) filter for a array of 32-bit fractional data values.
                             ;******************************************************
                             ;* a2          pFIR        - Pointer to a data structure containing private data for the iir filter
                             ;* 68(a7)      pX          - Pointer to the input vector of n data elements
                             ;* 72(a7)      pY          - Pointer to the output vector of n data elements
                             ;* d2          k           - Counter for inner loop
                             ;* d1          i           - Counter for outer loop
                             ;* d0          N           - Length of coefficients vector(N<=n)
                             ;* a0          pCurY       - Pointer to the current Y
                             ;* a1          pCurX       - Pointer to the current X
                             ;* a3          pCurCoef    - Pointer to the current coefficient
                             ;* a4          pCurHistory - Pointer to the current element of history buffer
                             ;* a5          pPredY      - Pointer to the previous Y
                             ;******************************************************
                             _FIR32_EMAC                                      
                             ;
0x00000000: 4fefffc4                            lea          -60(a7),a7       
0x00000004: 48d77fff                            movem.l      d0-d7/a0-a6,(a7) 
0x00000008: 4feffffc                            lea          -4(a7),a7        
                             ;
0x0000000c: a980                                move.l       MACSR, d0        
0x0000000e: 2e80                                move.l       d0,(a7)          
0x00000010: 4fef0004                            lea          4(a7),a7         
                                                                              ;
                                                                              ;#ifdef __FRACT_M
0x00000014: a93c00000030                        move.l       #0x00000030,MACSR 
                                                                              ;#else
                                                                              ;move.l		#0x00000000,MACSR
                                                                              ;#endif
                             ;
0x0000001a: 206f0048                            move.l       72(a7),a0        ;pCurY=pY;
0x0000001e: 226f0044                            move.l       68(a7),a1        ;pCurX=pX;
0x00000022: 246f0040                            move.l       64(a7),a2        ;N=pFIR->iFirCoefCount;
0x00000026: 202a0004                            move.l       4(a2),d0         
                             ;
0x0000002a: a13c00000000                        move.l       #0,ACC0          ;
0x00000030: a33c00000000                        move.l       #0,ACC1          
0x00000036: a53c00000000                        move.l       #0,ACC2          
0x0000003c: a73c00000000                        move.l       #0,ACC3          
                                                                              ;
0x00000042: 7204                                moveq.l      #4,d1            ;for(i=4;i<=N;i+=4) {
                             .FORi1                                           
0x00000044: b280                                cmp.l        d0,d1            ;
0x00000046: 62000188                            bhi          .ENDFORi1        ;

0x0000004a: 2c6f0044                            move.l       68(a7),a6        ;pCurX=pX+i-4;
0x0000004e: 43f61cf0                            lea          (-16,a6,d1.l*4),a1 
0x00000052: 2652                                move.l       (a2),a3          ;pCurCoef=pFIR->pFirCoef;

0x00000054: 4cd10078                            movem.l      (a1),d3-d6       ;d3=*pCurX++; d4=*pCurX++; d5=*pCurX++; d6=*pCurX; pCurX-=3;
0x00000058: 2c5b                                move.l       (a3)+,a6         ;a6=*pCurCoef++;

0x0000005a: ac216ade                            mac.l        a6,d6,<<,-(a1),d6,ACC3 ;ACC3+=a6*d6; d6=*--pCurX;
0x0000005e: aa0e0ad0                            mac.l        a6,d5,<<,ACC2    ;ACC2+=a6*d5;
0x00000062: a88e0ac0                            mac.l        a6,d4,<<,ACC1    ;ACC1+=a6*d4;
0x00000066: acdb3ace                            mac.l        a6,d3,<<,(a3)+,a6,ACC0 ;ACC0+=a6*d3; a6=*pCurCoef++;
                                                                              ;
0x0000006a: 243c00000004                        move.l       #4,d2            ;for(k=4; k<i; k+=4) {
                             .FORk1                                           
0x00000070: b481                                cmp.l        d1,d2            ;
0x00000072: 64000046                            bcc          .ENDFORk1        ;

0x00000076: aa215ade                            mac.l        a6,d5,<<,-(a1),d5,ACC3 ;ACC3+=a6*d5; d5=*--pCurX;
0x0000007a: a80e0ad0                            mac.l        a6,d4,<<,ACC2    ;ACC2+=a6*d4;
0x0000007e: a68e0ac0                            mac.l        a6,d3,<<,ACC1    ;ACC1+=a6*d3;
0x00000082: acdb6ace                            mac.l        a6,d6,<<,(a3)+,a6,ACC0 ;ACC0+=a6*d6; a6=*pCurCoef++;

0x00000086: a8214ade                            mac.l        a6,d4,<<,-(a1),d4,ACC3 ;ACC3+=a6*d4; d4=*--pCurX;
0x0000008a: a60e0ad0                            mac.l        a6,d3,<<,ACC2    ;ACC2+=a6*d3;
0x0000008e: ac8e0ac0                            mac.l        a6,d6,<<,ACC1    ;ACC1+=a6*d6;
0x00000092: acdb5ace                            mac.l        a6,d5,<<,(a3)+,a6,ACC0 ;ACC0+=a6*d5; a6=*pCurCoef++;

0x00000096: a6213ade                            mac.l        a6,d3,<<,-(a1),d3,ACC3 ;ACC3+=a6*d3; d3=*--pCurX;
0x0000009a: ac0e0ad0                            mac.l        a6,d6,<<,ACC2    ;ACC2+=a6*d6;
0x0000009e: aa8e0ac0                            mac.l        a6,d5,<<,ACC1    ;ACC1+=d6*d5;
0x000000a2: acdb4ace                            mac.l        a6,d4,<<,(a3)+,a6,ACC0 ;ACC0+=a6*d4; a6=*pCurCoef++;
0x000000a6: ac216ade                            mac.l        a6,d6,<<,-(a1),d6,ACC3 ;ACC3+=a6*d6; d6=*--pCurX;
0x000000aa: aa0e0ad0                            mac.l        a6,d5,<<,ACC2    ;ACC2+=a6*d5;
0x000000ae: a88e0ac0                            mac.l        a6,d4,<<,ACC1    ;ACC1+=a6*d4;
0x000000b2: acdb3ace                            mac.l        a6,d3,<<,(a3)+,a6,ACC0 ;ACC0+=a6*d3; a6=*pCurCoef++;
0x000000b6: 5882                                addq.l       #4,d2            ;
0x000000b8: 60b6                                bra          .FORk1           ;

                             .ENDFORk1                                        ;}
                             ;
0x000000ba: a68e0ac0                            mac.l        a6,d3,<<,ACC1    ;ACC1+=a6*d3;
0x000000be: a80e0ad0                            mac.l        a6,d4,<<,ACC2    ;ACC2+=a6*d4;
0x000000c2: ac5b5ade                            mac.l        a6,d5,<<,(a3)+,a6,ACC3 ;ACC3+=a6*d5; a6=*pCurCoef++;

0x000000c6: a60e0ad0                            mac.l        a6,d3,<<,ACC2    ;ACC2+=a6*d3;
0x000000ca: ac5b4ade                            mac.l        a6,d4,<<,(a3)+,a6,ACC3 ;ACC3+=a6*d4; a6=*pCurCoef++;

0x000000ce: a68e0ad0                            mac.l        a6,d3,<<,ACC3    ;ACC3+=a6*d3;

                                                                              ;
0x000000d2: 4aaa000c                            tst.l        12(a2)           ;if (pFIR=>iFirHistoryCount>0) {
0x000000d6: 670000e2                            beq          .ENDBUFx         ;
0x000000da: 2c6a0008                            move.l       8(a2),a6         ;pCurX=pFIR->pFirHistory+i-4;
0x000000de: 43f61cf0                            lea          (-16,a6,d1.l*4),a1 
0x000000e2: 2c52                                move.l       (a2),a6          ;pCurCoef=pFIR->pFirCoef+N;
0x000000e4: 47f60c00                            lea          (0, a6, d0.l*4), a3 

0x000000e8: 2619                                move.l       (a1)+,d3         ;d3=*pCurX++;

⌨️ 快捷键说明

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