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

📄 cfft_acqc.asm

📁 2407TI库函数
💻 ASM
字号:
;============================================================================
;
; File Name     : cfft_acqc.asm
; 
; Originator    : Digital Control Systems Group 
;                 Texas Instruments 
; 
; Description   : This file contains to acquire N samples in bit reversed order 
;                 to perform complex FFT computation
;               
; Date          : 26/4/2001 (dd/mm/yyyy)
;===========================================================================    
; Routine Type  : C Callable        
;
; Description   :
; void FFTC_acq(FFTCACQ_handle) 
; This function acquires N samples in bit-reversed order to cater to the complex
; FFT computation. The buffer should be aligned to 2N words
; 
;======================================================================
; typedef   struct {
;       int acqflag;
;       int count;
;       int size;
;       int input; 
;       int *tempptr;
;       int *buffptr;
;       void (*update)(void *); 
;       }FFTCACQ;  
;======================================================================
; Function Local Frame
;======================================================================
;   |_______|
;   |_______|<- Stack Pointer                           (FP+1) <---AR1 
;   |_______|<- Reg to Reg Tfr                          (FP)   <---AR0 
;   |_______|<- Old FP (AR0)                            (FP-1)
;   |_______|<- Return Address of the Caller            (FP-2)
;   |_______|<- Module Handle                           (FP-3) 
;======================================================================

__FFTC_acq_frs  .set    00001h          ; Local frame size for this routine 
                .def    _FFTC_acq       ; 
                
_FFTC_acq:           
            POPD    *+              ; Store the Return Address in stack
            SAR     AR0,*+          ; Store the Caller's Frame Pointer 
            SAR     AR1,*                 
            LAR     AR0,#__FFTC_acq_frs     
            LAR     AR0,*0+,AR2     ; Create Local frame     
            
            LAR     AR2,#0FFFDh     ; ARP=AR2, AR2=-3
            MAR     *0+             ; ARP=AR2, AR2=FP-3->Module handle
            LAR     AR2,*           ; ARP=AR2, AR2->acqflag
            LACC    *+              ; ARP=AR2, AR2->count, ACC=acqflag
            BCND    noacq,EQ        ; if acqflag=0, then return
            
            LACC    *               ; ARP=AR2, AR2->count, ACC=count
            BCND    acqover,EQ      ; if count=0, acquisition is complete
            
            SUB     #1              ; ARP=AR2, AR2->count, ACC=count-1
            SACL    *+              ; ARP=AR2, AR2->size, count=count-1   
            LAR     AR0,*+          ; ARP=AR2, AR2->input, AR0=size   
            LACL    *+              ; ARP=AR2, AR2->tempptr, ACCL=input
            LAR     AR3,*,AR3       ; ARP=AR3, AR3=tempptr, AR2->buffptr
            SACL    *BR0+,0,AR2     ; ARP=AR2, AR2->tempptr         
            SAR     AR3,*           ; update buffptr 
            
noacq:      MAR     *,AR1
            SBRK    #(__FFTC_acq_frs+1)     ; Clear the local frame
            LAR     AR0,*-          ; Retrive Caller's frame pointer
            PSHD    *               ; Push the return address to TOS
            RET      
                     
                     
                     
acqover:    SBRK    #1              ; ARP=AR2, AR2->acqflag
            SPLK    #0,*            ; ARP=AR2, AR2->acqflag, acqflag=0
            
            ADRK    #2              ; ARP=AR2, AR2->size
            LACL    *-              ; ARP=AR2, AR2->count, ACCL=size
            SACL    *               ; ARP=AR2, AR2->count, count=size
            
            ADRK    #4              ; ARP=AR2, AR2->buffptr
            LACL    *-              ; ARP=AR2, AR2->tempptr, ACCL=buffptr
            SACL    *               ; ARP=AR2, AR2->tempptr, tempptr=buffptr
            
            MAR     *,AR1
            SBRK    #(__FFTC_acq_frs+1)     ; Clear the local frame
            LAR     AR0,*-          ; Retrive Caller's frame pointer
            PSHD    *               ; Push the return address to TOS
            RET      
            
            
            
            

⌨️ 快捷键说明

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