3.3
Data Sorting Example
A_1022 A_1023 A_1024
B_1023
B_1022
B_1024
D_1023
C_1023
D_1022
C_1022
D_1024
C_1024
...
...
...
...
...
...
...
...
D_2
D_1
D_3
C_2
B_2
A_2
C_1
B_1
A_1
B_3
C_3
A_3
8000 0000h
D_1
D_2
D_1023
...
D_3
...
D_1022
D_1024
B_1
C_1
A_1
B_2
C_2
A_2
C_1023
B_1023
A_1023
...
...
...
B_3
C_3
A_3
...
...
...
C_1022
B_1022
A_1022
B_1024 C_1024
A_1024
1180 0000h
Data Sorting Example
www.ti.com
Many applications require the use of multiple data arrays; it is often desirable to have the arrays arranged
such that the first elements of each array are adjacent, the second elements are adjacent, and so on.
Often this is not how the data is presented to the device. Either data is transferred via a peripheral with
the data arrays arriving one after the other or the arrays are located in memory with each array occupying
a portion of contiguous memory spaces. For these instances, the EDMA3 can reorganize the data into the
desired format.
shows the data sorting.
In order to determine the parameter entry values, the following need to be considered:
•
ACNT – Program this to be the size in bytes of an element.
•
BCNT – Program this to be the number of elements in a frame.
•
CCNT – Program this to be the number of frames.
•
SRCBIDX – Program this to be the size of the element or ACNT.
•
DSTBIDX = CCNT
×
ACNT
•
SRCCDX = ACNT
×
BCNT
•
DSTCIDX = ACNT
The synchronization type needs to be AB-synchronized and the STATIC bit is 0 to allow updates to the
parameter set. It is advised to use normal DMA channels for sorting.
It is not possible to sort this with a single trigger event. Instead, the channel can be programmed to be
chained to itself. After BCNT elements get sorted, intermediate chaining could be used to trigger the
channel again causing the transfer of the next BCNT elements and so on.
shows the parameter
set programming for this transfer, assuming channel 0 and an element size of 4 bytes.
Figure 3-5. Data Sorting Example
EDMA3 Transfer Examples
70
SPRUG34 – November 2008
Содержание TMS320DM357
Страница 2: ...2 SPRUG34 November 2008 Submit Documentation Feedback ...
Страница 12: ...List of Tables 12 SPRUG34 November 2008 Submit Documentation Feedback ...
Страница 16: ...Read This First 16 SPRUG34 November 2008 Submit Documentation Feedback ...
Страница 64: ...EDMA3 Architecture 64 SPRUG34 November 2008 Submit Documentation Feedback ...