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

📄 fir_c55.asm

📁 用dsp解压mp3程序的算法
💻 ASM
字号:
;**********************************************************
; fir_c55 - TMS320C55x assembly routine that can be called
;           from C main program
; This function can be called as follows:
;    yn = fir_c55(xnbuf,BL,B);
; where
;    xnbuf - signal vector 
;    BL - length of FIR filter
;    B - coefficient vector
;**********************************************************
    .def  _fir_c55 
    .text
	
_fir_c55         
    pshm  ST1_55             ; save ST1, ST2, and ST3
    pshm  ST2_55
    pshm  ST3_55
		
    or    #0x340,mmap(ST1_55); set FRCT,SXMD,SATD
    bset  SMUL               ; set SMUL        
    sub   #2,T0              ; T0=BL-2
    mov   T0,CSR             ; repeat CSR BL-1 times                        
    rpt   CSR                ; repeat the next instruction
    macm  *AR0+,*AR1+,AC0    ; MAC
    macmr *AR0,*AR1,AC0      ; do the last operation 	    
    mov   hi(AC0),T0         ; save Q15 filtered value 

    popm  ST3_55             ; restore ST1, ST2, and ST3
    popm  ST2_55 
    popm  ST1_55	
                             ; return signal buffer index
    ret
    .end

⌨️ 快捷键说明

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