Pipeline Timing and Throughput
917
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Direct Memory Access (DMA) Module
8 bursts * [(4 cycles/word * 8 words/burst) + 1] = 264 cycles
11.3.1 DMA Read Access of ADC Registers
DMA access to the ADC result registers is achieved via the ACIB. The ACIB path produces different cycle
counts for DMA transfers when compared to simple transfers such as RAM-to-RAM data transfers.
Additional cycles are needed for the "Read SRC data (N)” portion of the
timing diagram.
For improved efficiency, the ACIB automatically uses a 64-bit read mode when the ADC result registers
are accessed with burst reads and the following two conditions are met:
1. The DMA is set to 32-bit transfer mode, and
2. The DMA start address is aligned to a 64-bit boundary (Note: The start address of ADC1 and ADC2
result registers fall on 64-bit boundaries)
The total number of Control Subsystem clock cycles required for transferring ADC results using the DMA
in conjunction with the 64-bit ACIB read mode can be generalized as:
{ [ACIB Read Cycles] + [DMA Burst Cycles] } * Number-of-DMA-Bursts
ACIB Read Cycles is calculated as:
16 ACIB Cycles * (Bits per DMA Burst / 64 bits) * (Control Subsys Freq / Analog Subsys Freq)
DMA Burst Cycles is calculated as:
2 Cycles * (Bits per DMA Burst / 32 bits)
For example, to transfer 16 16-bit words (16 ADC Results) to RAM, the DMA burst size is set to 16 words
so that the total 256-bit transfer is completed with one DMA burst. The cycles required for this transfer is:
{ [ 16 * (256 / 64) * (150 / 37.5) ] + [ 2 * (256 / 32) ] } * 1 = 272 Cycles
11.4 CPU Arbitration
Typically, DMA activity is independent of the CPU activity. Under the circumstance where both the DMA
and the CPU are attempting to access memory or a peripheral register within the same interface
concurrently, an arbitration procedure will occur. Any combined accesses between the different interfaces,
or where the CPU access is outside of the interface that the DMA is accessing do not create a conflict.
For example, if the CPU is accessing ePWM while the DMA is simultaneously accessing McBSP, it will
create a conflict because both ePWM and McBSP reside in a common interface (peripheral frame 3).
However, if the CPU is accessing shared RAM while the DMA is accessing message RAM, there will be
no conflict, since these two memories are located in different interfaces (shared resources and C28x local
memory).
The interfaces which internally contain conflicts are:
•
L2/L3 C28x local RAM
•
CTOM MSG RAM
•
MTOC MSG RAM
•
S0-S7 shared RAM
•
McBSP peripheral frame 3
•
ePWM/HRPWM peripheral frame 3
If the CPU and the DMA make an access to the same RAM block in the same cycle, the conflict is
resolved with round-priority scheme. If the CPU and the DMA make an access to the same peripheral
frame in the same cycle, the DMA has priority and the CPU is stalled.
If a CPU access to an interface is in progress and another CPU access to the same interface is pending,
for example, the CPU is performing a write operation and a read operation from the CPU is pending, then
a DMA access to that same interface has priority over the pending CPU access when the current CPU
access completes.