![background image](http://html1.mh-extra.com/html/texas-instruments/tms320c28x/tms320c28x_reference-manual_1097071146.webp)
Indirect Addressing Modes
5-22
Figure 5
−
1. Circular Buffer with AMODE = 0
X
X
0
8
15
8 7
0
Buffer size = 8 + 1 = 9
31
0
AR1
XAR6
Top of buffer
Bottom of buffer
XAR6[7:0] is incremented until it matches AR1[7:0]
7
8
X X X X X X
0
0
Must be zero
X
XAR6
31
X
X
Matches AR1[7:0]
X
X
X
8
8
0
7
0
Example(s):
; Calculate FIR filter (X[N] = data array, C[N] = coefficient array):
MOVW DP,#Xpointer ; Load DP with page address of Xpointer
MOVL XAR6,@Xpointer ; Load XAR6 with current X pointer
MOVL XAR7,#C ; Load XAR7 with start address of C array
MOV @AR1,#N ; Load AR1 with size of data array N,
SPM −4 ; Set product shift mode to “>> 4”
ZAPA ; Zero ACC, P, OVC
RPT #N−1 ; Repeat next instruction N times
||QMACL P,*AR6%++,*XAR7++ ; ACC = ACC + P >> 4,
; P = (*AR6%++ * *XAR7++) >> 32
ADDL ACC,P << PM ; Final accumulate
MOVL @Xpointer,XAR6 ; Store XAR6 into current X pointer
MOVL @Sum,ACC ; Store result into sum
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 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...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...