📄 rfft_acqc.asm
字号:
;============================================================================
;
; File Name : rfft_acqc.asm
;
; Originator : Digital Control Systems Group
; Texas Instruments
;
; Description : This file contains to acquire 2N samples and store as N complex valued
; sequence in bit-reversed order
;
; Date : 26/4/2001 (dd/mm/yyyy)
;===========================================================================
; Routine Type : C Callable
;
; Description :
; void FFTR_acq(FFTRACQ_handle)
; This function acquires 2N samples and stores it in a buffer as N-point complex sequence
; in bit reversed order. This is used for real 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 *);
; }FFTRACQ;
;
;======================================================================
; 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)
;======================================================================
__FFTR_acq_frs .set 00001h ; Local frame size for this routine
.def _FFTR_acq ;
_FFTR_acq:
POPD *+ ; Store the Return Address in stack
SAR AR0,*+ ; Store the Caller's Frame Pointer
SAR AR1,*
LAR AR0,#__FFTR_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
BIT *,15 ; if MOD(count,2)==1, set TC
SUB #1 ; ARP=AR2, AR2->count, ACC=count-1
SACL *+ ; ARP=AR2, AR2->size, count=count-1
LACL *+,AR0 ; ARP=AR0, AR0=FP, ACCL=SIZE, AR2->input
SFR ; ARP=AR0, AR0=FP, ACCL=SIZE/2
SACL * ; ARP=AR0, AR0=FP, (FP)=SIZE/2
LAR AR0,*,AR2 ; ARP=AR2, AR2->input
LACL *+ ; ARP=AR2, AR2->tempptr, ACCL=input
LAR AR3,*,AR3 ; ARP=AR3, AR3=tempptr, AR2->buffptr
BCND oddseq,TC
SACL *
noacq: MAR *,AR1
SBRK #(__FFTR_acq_frs+1) ; Clear the local frame
LAR AR0,*- ; Retrive Caller's frame pointer
PSHD * ; Push the return address to TOS
RET
oddseq: ADRK #1 ; ARP=AR3
SACL *-
MAR *BR0+,AR2 ; ARP=AR2, AR2->tempptr
SAR AR3,* ; Update the tempptr
B noacq
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
B noacq
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -