📄 fir16_mac.s.list
字号:
0x0000007c: 3a24 move.w -(a4),d5 ; -=Getting current element of history buffer=-
0x0000007e: a8050200 mac.w d5.l,d4.l,<< ; -=Getting next(first) iteration of inner loop=-
0x00000082: 5282 addq.l #1,d2 ; -=Incrementing "k"=-
.EVENk2
0x00000084: 281b move.l (a3)+,d4 ; -=Getting next current coefficient=-
.FORk2 ; for(k=i;k<N;k++) -=Begin of main part (2) of inner loop=-
0x00000086: b480 cmp.l d0,d2 ; -=Comparing "k" with "N"=-
0x00000088: 64000010 bcc .NEXTif ; { -=If (k=>N) then jump to .NEXTif=-
;-=In one program loop we do two MAC operation = 2 FIR inner loop itteration;
; use move long, parallel filling register,
; predecriment and post increment and use left shifting to get fractional multiplication=-
;-=output+=*pCurHistory--*(*pCurCoef++)=-
0x0000008c: 2a24 move.l -(a4),d5 ; -=Getting next current element of history buffer=-
0x0000008e: a8050240 mac.w d5.u,d4.l,<< ; -=First MAC=-
0x00000092: a89b4285 mac.w d5.l,d4.u,<<,(a3)+,d4 ; -=Second MAC and getting next current coefficient=-
0x00000096: 5482 addq.l #2,d2 ; -=Incrementing "k" by 2=-
0x00000098: 60ec bra .FORk2 ; } -=Jumping to .FORk2=-
.NEXTif ; }
;---== End of cycle of getting Y[i] ==---
0x0000009a: a187 move.l acc,d7 ; *pCurY++=output; -=Moving accumulator to general register=-
;-=we need to transfer only upper word=-
0x0000009c: 4847 swap d7 ; -=Aligning most significant 16 bits of acc=-
0x0000009e: 30c7 move.w d7,(a0)+ ; -=Store Y[i]=-
0x000000a0: 5281 addq.l #1,d1 ; i++ -=Incrementing "i"=-
0x000000a2: 6000ff7e bra .FORi1 ; -=Jumping to .FORi1=-
.NEXTi1 ; }
;---====== End of cycle Y[1]..Y[N-1] ======---
;---====== Begin of cycle of getting Y[N]..Y[n] ======---
0x000000a6: 2200 move.l d0,d1 ; for(i=N;i<=n;i++) -=Begin of outer loop (number 2)=-
.FORi2
0x000000a8: b286 cmp.l d6,d1 ; -=Comparing "i" with "N"=-
0x000000aa: 62000042 bhi .NEXTi2 ; { -=If (i>n) then jump to .NEXTi2=-
0x000000ae: a13c00000000 move.l #0,acc ; output=0; -=Accumulator initialization=-
0x000000b4: 43f51a00 lea (0,a5,d1.l*2),a1 ; pCurX=pX+i-1; -=Current sample pointer initialization=-
0x000000b8: 2652 move.l (a2),a3 ; pCurCoef=pFIR->pFirCoef; -=Current coefficient pointer initialization=-
;---== Begin of cycle of getting Y[i] ==---
0x000000ba: 7400 moveq #0,d2 ; k=0 -=Begin of inner loop=-
0x000000bc: 08000000 btst #0,d0 ; -=Testing that "N" is even or not=-
0x000000c0: 6700000c beq .EVENk3 ; -=If "N" is even then jump to .EVENk3=-
;-=we do this omly in case of "N" is odd number=-
0x000000c4: 381b move.w (a3)+,d4 ; -=Getting current coefficient=-
0x000000c6: 3621 move.w -(a1),d3 ; -=Getting current sample=-
0x000000c8: a8030200 mac.w d3.l,d4.l,<< ; -=Getting first iteration of inner loop=-
0x000000cc: 5282 addq.l #1,d2 ; -=Incrementing "k"=-
.EVENk3
0x000000ce: 281b move.l (a3)+,d4 ; -=Getting next current coefficient=-
.FORk3 ; for(k=0;k<N;k++) -=Begin of main part of inner loop=-
0x000000d0: b480 cmp.l d0,d2 ; { -=Comparing "k" with "N"=-
0x000000d2: 64000010 bcc .ENDFORk3 ; -=If (k=>N) then jump to .ENDFORk3=-
;-=In one program loop we do two MAC operation = 2 FIR inner loop itteration;
; use move long, parallel filling register,
; predecriment and post increment and use left shifting to get fractional multiplication=-
;-=output+=*pCurX--*(*pCurCoef++);=-
0x000000d6: 2621 move.l -(a1),d3 ; -=Getting next current sample=-
0x000000d8: a8030240 mac.w d3.u,d4.l,<< ; -=First MAC=-
0x000000dc: a89b4283 mac.w d3.l,d4.u,<<,(a3)+,d4 ; -=Second MAC and getting next current coefficient=-
0x000000e0: 5482 addq.l #2,d2 ; -=Incrementing "k" by 2=-
0x000000e2: 60ec bra .FORk3 ; } -=Jumping to .FORk1=-
.ENDFORk3
;---== End of cycle of getting Y[i] ==---
0x000000e4: a187 move.l acc,d7 ; *pCurY++=output; -=Moving accumulator to general register=-
;-=we need to transfer only upper word=-
0x000000e6: 4847 swap d7 ; -=Aligning most significant 16 bits of acc=-
0x000000e8: 30c7 move.w d7,(a0)+ ; -=Store Y[i]=-
0x000000ea: 5281 addq.l #1,d1 ; i++ -=Incrementing "i"=-
0x000000ec: 60ba bra .FORi2 ; -=Jumping to .FORi2=-
.NEXTi2 ; }
;---====== End of cycle Y[N]..Y[n] ======---
;---====== Begin of History Buffer Loading ======---
0x000000ee: 2e06 move.l d6,d7 ; -=pCurX=pX+n-N+1;=-
0x000000f0: 9e80 sub.l d0,d7
0x000000f2: 43f57a02 lea (2,a5,d7.l*2),a1
0x000000f6: 284e move.l a6,a4 ; pCurHistory=pFIR->pFirHistory;
0x000000f8: 7201 moveq #1,d1 ; for(i=1;i<N;i++) -= i=1 =-
.FORbuf
0x000000fa: b280 cmp.l d0,d1 ; -=Comparing "i" with "N"=-
0x000000fc: 64000008 bcc .ENDbuf ; { -=If (i=>N) then jump to .ENDbuf=-
0x00000100: 38d9 move.w (a1)+,(a4)+ ; *pCurHistory++=*pCurX++;
0x00000102: 5281 addq.l #1,d1 ; -=Incrementing "i"=-
0x00000104: 60f4 bra .FORbuf ; -=Jumping to .FORbuf=-
.ENDbuf ; }
0x00000106: 5381 subq.l #1,d1 ; pFIR->iFirHistoryCount=N-1;
0x00000108: 2541000c move.l d1,12(a2) ; }
;---====== End of History Buffer Loading ======---
;-=Restoring values of used registers=-
0x0000010c: 4cd77fff movem.l (a7),d0-d7/a0-a6
0x00000110: 4fef003c lea 60(a7),a7
0x00000114: 4e75 rts
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -