Data Sheet
June 2001
DSP16410B Digital Signal Processor
98
Agere Systems—Proprietary
Use pursuant to Company instructions
Agere Systems Inc.
4 Hardware Architecture
(continued)
4.13 Direct Memory Access Unit (DMAU)
(continued)
4.13.9 Programming Examples
(continued)
4.13.9.3 MMT Example
This example illustrates the use of MMT4 to move a source block of 100 rows or elements (r
=
100) in TPRAM0 to
a destination block in TPRAM1, as
Figure 25
illustrates. For this example, the source address in TPRAM0 is
0x01000 and the destination address in TPRAM1 is 0x02000.
Memory-to-Memory Block Transfer
Figure 25. Memory-to-Memory Block Transfer
The user software running in one of the cores must perform the following steps to properly initialize MMT4:
1. The user software writes the source address (
SADD4
—
Table 37 on page 76
) with the top of the output (source)
block located in TPRAM0. The user software writes 0x00001000 to
SADD4
.
2. The user software writes the destination address (
DADD4
—
Table 37 on page 76
) with the top of the input (des-
tination) block located in TPRAM1. The user software writes 0x00102000 to
DADD4
.
3. The user software clears the source and destination counter registers
SCNT4
and
DCNT4
(
Table 39 on page 77
and
Table 41 on page 78
).
4. The user software initializes the limit register (
LIM4
—
Table 43 on page 79
) with the dimensions of the array. The
number of rows (or elements) is 100, so the user software writes 99 (r – 1) into the LASTROW[12:0] field
(
LIM4
[19:7] = 0x63). The number of columns is one, so the user software writes zero into the LASTCOL[6:0]
field (
LIM4
[6:0]). The user software writes 0x03180 to
LIM4
.
5. The user software writes the control registers to enable MMT4 and begin block processing. First, the user soft-
ware writes two into the POSTMOD[1:0] field (
CTL4
[5:4]—
Table 36 on page 75
) to enable pointer and counter
update operations, and writes 0x1 to the SIGCON[2:0] field (
CTL4
[3:1]). The user software writes 0x0022 to
CTL4
.
6. Finally, the user software sets the SLKA4 field (
DMCON0
[8]—
Table 31 on page 70
) to enable source look-
ahead, sets the XSIZE4 field (
DMCON0
[12]) to transfer 32-bit words, and sets the TRIGGER4 field
(
DMCON0
[10]) to initiate MMT4 block transfers. The user software writes 0x1500 to
DMCON0
.
The DMAU begins processing the MMT4 channel. For each read operation from TPRAM0 starting at address
0x01000, the DMAU increments
SADD4
by two and increments the SROW[12:0] field of
SCNT4
by one. The
DMAU performs multiple fetches from TPRAM0 and places the data into the source look-ahead buffer. For each
write operation to TPRAM1 starting at address 0x02000, the DMAU increments
DADD4
by two and increments the
SROW[12:0] field of
DCNT4
by one. Because SIGCON[2:0] =
0x
1, the DMAU interrupts the cores when the trans-
fer is half complete (DROW[12:0] = LASTROW/2 = LASTROW[12:0]>>1 = 0x31 or
DCNT4
= 0x1880). The ISR
then changes SIGCON[2:0] to 0x4 to cause the DMAU to interrupt the cores again when the transfer is complete
(DROW[12:0] = LASTROW[12:0] or
DCNT4
=
LIM4
= 0x3180).
DESTINATION ARRAY
SOURCE ARRAY
TRANSFER
0x0102000
0x0001000
(SADD4)
(DADD4)
ROW=0
ROW=1
ROW=99
ROW=49
C
TRANSFER
1/2 COMPLETE
ROW=0
ROW=1
ROW=99
ROW=49
0x0001002
0x0102002
C