Analog Devices ADSP-21261 SHARC Hardware Reference Manual page 193

Hide thumbs Also See for ADSP-21261 SHARC:
Table of Contents

Advertisement

THE FOLLOWING SYNTAX SETS UP AND ACCESSES A CIRCULAR BUFFER WITH:
LENGTH = 11
BASE ADDRESS = 0X80500
MODIFIER = 4
BIT SET MODE1 CBUFEN;
B0 = 0X80500;
L0 = 11;
M1 = 4;
LCNTR = 11, DO MY_CIR_BUFFER UNTIL LCE;
1
0
1
2
3
2
4
5
6
7
3
8
9
10
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.
Figure 4-4. Circular Data Buffers
On the first post-modify access to the buffer, the DAG outputs the
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
buffer length, the DAG subtracts (positive) or adds (negative) the
ter value before writing the updated index value to the
equation form, these post-modify and wraparound operations work as
follows.
ADSP-2126x SHARC Processor Hardware Reference
/* ENABLES CIRCULAR BUFFER ADDRESSING; SET BY DEFAULT */
/* LOADS B0 AND L0 REGISTERS WITH BASE ADDRESS */
/* LOADS L0 REGISTER WITH LENGTH OF BUFFER */
/* LOADS M1 WITH MODIFIER OR STEP SIZE */
/* SETS UP A LOOP CONTAINING BUFFER ACCESSES */
0
4
1
2
3
4
5
5
6
7
8
6
9
10
register. If the updated value is outside the
I
Data Address Generators
0
1
7
2
3
4
5
8
6
7
8
9
9
10
0
1
2
10
3
4
5
6
11
7
8
9
10
reg-
I
regis-
L
register. In
I
4-15

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-21262 sharcAdsp-21266 sharcAdsp-21267 sharc

Table of Contents