📄 freqflt.asm
字号:
;
; freqflt.asm - Routine to perform frequency domain filtering
;
; Protptye: void freqflt(complex *, complex *, unsigned int);
;
; Entry: arg0: AR0 is the pointer to X[]
; arg1: AR1 is the pointer to H[]
; arg2: T0 is the bin numbers of the FFT, N
.global _freqflt
.sect "fft_code"
_freqflt:
pshm ST1_55
pshm ST3_55
sub #1,T0
mov T0,BRC0 ; Loop trip counter = N-1
mov #2,T0 ; Offset of H[] update
bset SMUL
bset SATD
bset FRCT
|| rptblocal product_loop-1 ; for (i=0; i<N; i++)
mpym *AR0+,*AR1+,AC1 ; AC1 = X[i].re * H[i].re
masm *AR0-,*AR1,AC1 ; AC1 -= X[i].im * H[i].im
mpym *AR0+,*AR1-,AC0 ; AC0 = X[i].re * H[i].im
macm *AR0-,*(AR1+T0),AC0 ; AC0 += X[i].im * H[i].re
mov rnd(hi(AC1)),*AR0+ ; X[i].re = AC1>>16
|| neg AC0 ; X[i].im = -AC0>>16
mov rnd(hi(AC0)),*AR0+
product_loop
popm ST3_55
popm ST1_55
ret
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -