Indirect Addressing Modes
5-24
Figure 5
−
2. Circular Buffer with AMODE = 1
0
0
0
9
0
0
0
0
31
16 15
0
Buffer size =
9 + 1 = 10
Buffer index
31
0
003F8010
XAR1
XAR6
Top of buffer
Bottom of buffer
XAR6 + XAR1[15:0] = 3F8010h
XAR1[15:0] increments until
it matches XAR1[31:16]
XAR6 + XAR1[15:0] = 3 0009h
Matches
XAR1[31:16]
0x0000
Example(s):
; Calculate FIR filter (X[N] = data array, C[N] = coefficientv array):
MOVW DP,#Xindex ; Load DP with page address of Xindex
MOVL XAR6,#X ; Load XAR6 with start address of X array
MOV @AH,#N ; Load AH with size of array X (N)
MOV AL,@Xindex ; Load AL with current circular index
MOVL XAR1,@ACC ; Load parameters into XAR1
MOVL XAR7,#C ; Load XAR7 with start address of C array
SPM −4 ; Set product shift mode to “>> 4”
ZAPA ; Zero ACC, P, OVC
RPT #N−1 ; Repeat next instruction N times
||QMACL P,*+XAR6[AR1%++],*XAR7++ ; ACC = ACC + P >> 4,
; P = (*AR6%++ * *XAR7++) >> 32
ADDL ACC,P << PM ; Final accumulate
MOV @Xindex,AR1 ; Store AR1 into current X index
MOVL @Sum,ACC ; Store result into sum
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...