BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
176
Section 7: DMA
Document
1250_1125-UM100CB-R
D
ATA
M
OVER
The Data Mover can perform transfers between arbitrary addresses. The source for a transfer can be either
memory or an I/O device, and the destination of the transfer can be either memory or an I/O device. The
alignment of the source and destination can differ, in which case the engine will participate in the MESI
coherence protocol to ensure the correct merge is done at the start and end of the transfer. The Data Mover
has four channels (in many cases this is sufficient for them to be allocated to processors/processes to avoid
the need for locking accesses to the control registers). When multiple channels have requests a modified round
robin service schedule is applied, this provides fair access to all the channels while optimizing requests to
memory to allow open-bank page mode access. The buffering in the Data Mover is sufficient that it can run at
the full memory bandwidth.
D
ATA
M
OVER
O
PERATION
The Data Mover channels can only be configured for ring mode. The descriptor A pointer points to the
destination of the transfer and the descriptor B pointer points to the source of the transfer. These addresses
can have any alignment. There is no buffer size, just the length parameter which may specify up to 1 MByte of
data. The Data Mover reads and writes in 32 byte blocks as much as possible, either using the full coherence
protocol or as uncached but merged data (similar to the CPU uncached accelerated). If the full coherence
protocol is used and a smaller block needs to be written the Data Mover will read the block exclusive, merge
in the new data and write the block back. If uncached accelerated mode is used then the byte enable signals
will indicate the valid data and the Data Mover does not do a merge.
The source and destination addresses can be incremented, decremented or held constant for each 32 byte
block. This allows movement of overlapping regions; if the source address is less than the destination the data
should be moved from the top end of the buffer with both addresses decrementing, if the source address is
greater then the data should be moved starting at the bottom of the region and incrementing the addresses.
Holding the address constant is useful for transfers to or from I/O devices.
If the source and destination move in different directions the Data Mover will not reorder the bytes within the
32 byte line, and the addresses must be cache aligned. In this case if A[4:0] of either address is nonzero the
behavior of the move is UNPREDICTABLE.
There is a level 2 cache flag associated with both the source and destination addresses. This is used to request
the data be allocated in the L2 cache on a miss. In most cases it would only be used on the destination side
(if at all) since there is little point in caching data that is being moved.
One case where the L2 cacheability attribute would be set on the source is when the prefetch bit is set. In this
case the destination is ignored and only the reads are done. If the reads are done with the L2 allocation bit set
this will prefetch the data into the L2 cache. In uncacheable I/O space this mode could be used to flush an
external FIFO.
There is also a zero_mem bit. If this is set the source address is ignored and destination is written with zeros.
If the data mover is used to perform accesses to the HyperTransport space it can only use a subset of reads.
For any access the HyperTransport interface will only accept reads that are less than 8 bytes or are aligned to
a 4 byte boundary and a multiple of 4 bytes (up to the full 32 bytes in the block), any other sizes will result in
UNDEFINED behavior. Thus a move may need to be broken up into the odd bytes needed to align to a 4 byte
boundary, then the main block (a multiple of 4 bytes), then the tail bytes. Any size of write will work correctly.