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

📄 asmintpfir.asm

📁 CHP 4 - Real-Time Digital Signal Processing: Implementations and Applications, Second Edition by Sen
💻 ASM
字号:
; 
;  Project: Exercise 4.26 Interpolation using FIR filter - Chapter 4
;  File name: asmIntpFir.asm
;
;  Description: This is the C55x implementation of the interpolation filter for Exercise 4.26
;
;  For the book "Real Time Digital Signal Processing: 
;                Implementation and Application, 2nd Ed"
;                By Sen M. Kuo, Bob H. Lee, and Wenshun Tian
;                Publisher: John Wiley and Sons, Ltd
;
;  Tools used: CCS v.2.12.07
;              TMS320VC5510 DSK Rev-C
;

	.mmregs
	.sect	".text:fir"
	.align 4
	.global	_interpolate

;----------------------------------------------------------------------
;   void fixedPointIntpFir(short *x,       => AR0
;                          short blkSize,  => T0                
;                          short *h,       => AR1
;                          short order,    => T1                                       
;                          short *y,       => AR2                                                  
;                          short *w,       => AR3
;                          short *index,   => AR4                                       
;                          short intp      => SP(-1)
;    )                                                            
;----------------------------------------------------------------------

NUM_PUSHS     .set  3

_interpolate:
    pshm  ST1_55              
    pshm  ST2_55
    pshm  ST3_55

    or    #0x340,mmap(ST1_55) 
    bset  SMUL                
    mov   XAR1,XCDP            
    mov   mmap(AR3),BSA23     
    mov   mmap(AR1),BSAC      
    mov   mmap(T1),BKC        
    mov   mmap(T1),BK03       
    mov   *AR4,AR3           
    or    #0x108,mmap(ST2_55) 

    sub   #1,T0
    mov   T0,BRC0 
    mov   *SP(#(NUM_PUSHS+1)),T0 
    sub   #1,T0 
    mov   T0,BRC1                 
    sub   #3,T1
    mov   T1,CSR                
||  rptblocal sample_loop-1     
    mov   #0,AR1             
    mov   #0,CDP 
    mov   *AR0+,*AR3             
||  rptblocal middle_loop-1 
    mov   AR1,CDP       
    mpym  *AR3+,*(CDP+T0),AC0    
||  rpt   CSR                       
    macm  *AR3+,*(CDP+T0),AC0                  
    macmr *AR3+,*CDP,AC0               
    mov   hi(AC0),*AR2+   
||  amar  *AR1+
middle_loop    
    amar   *AR3+
sample_loop

    mov  AR3,*AR4
    and  #0xfef7,mmap(ST2_55) 
    popm  ST3_55              
    popm  ST2_55
    popm  ST1_55
    ret

	.end

⌨️ 快捷键说明

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