
ADSP-2126x SHARC Processor Hardware Reference
4-15
Data Address Generators
On the first post-modify access to the buffer, the DAG outputs the
I
reg-
ister value on the address bus then modifies the address by adding the
modify value. If the updated index value is within the buffer length, the
DAG writes the value to the
I
register. If the updated value is outside the
buffer length, the DAG subtracts (positive) or adds (negative) the
L
regis-
ter value before writing the updated index value to the
I
register. In
equation form, these post-modify and wraparound operations work as
follows.
Figure 4-4. Circular Data Buffers
0
1
2
3
4
5
6
7
8
9
10
1
2
3
0
1
2
3
4
5
6
7
8
9
10
4
5
6
0
1
2
3
4
5
6
7
8
9
10
7
8
9
0
1
2
3
4
5
6
7
8
9
10
10
11
THE COLUMNS ABOVE SHOW THE SEQUENCE IN ORDER OF LOCATIONS ACCESSED IN ONE PASS.
NOTE THAT "0" ABOVE IS ADDRESS DM(0X80500). THE SEQUENCE REPEATS ON SUBSEQUENT PASSES.
THE FOLLOWING SYNTAX SETS UP AND ACCESSES A CIRCULAR BUFFER WITH:
LENGTH = 11
BASE ADDRESS = 0X80500
MODIFIER = 4
BIT SET MODE1 CBUFEN;
/* ENABLES CIRCULAR BUFFER ADDRESSING; SET BY DEFAULT */
B0 = 0X80500;
/* LOADS B0 AND L0 REGISTERS WITH BASE ADDRESS */
L0 = 11;
/* LOADS L0 REGISTER WITH LENGTH OF BUFFER */
M1 = 4;
/* LOADS M1 WITH MODIFIER OR STEP SIZE */
LCNTR = 11, DO MY_CIR_BUFFER UNTIL LCE;
/* SETS UP A LOOP CONTAINING BUFFER ACCESSES */
Summary of Contents for ADSP-21261 SHARC
Page 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Page 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Page 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Page 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Page 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Page 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Page 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Page 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Page 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Page 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Page 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Page 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...