Intel
®
81341 and 81342—Application DMA Unit
Intel
®
81341 and 81342 I/O Processors
Developer’s Manual
December 2007
484
Order Number: 315037-002US
5.4.3
Appending to the End of a Chain
Once the ADMA has started processing a chain of descriptors, application software may
need to append a chain descriptor to the current chain without interrupting the transfer
in progress. The mechanism used for performing this action is controlled by the Chain
Resume bit in the ADMA Control Register (ACCR).
The ADMA reads the subsequent chain descriptor each time it completes the current
chain descriptor and the ADMA Next Descriptor Address Register (ANDAR) is non-zero.
ANDAR always contains the address of the next chain descriptor to be read and the
ADMA Descriptor Address Register (ADAR) always contains the address of the current
chain descriptor.
The procedure for appending chains requires the software to find the last chain
descriptor in the current chain and change the Next Descriptor Address in that
descriptor to the address of the new chain to be appended. The software then sets the
Chain Resume bit in the ACCR. It does not matter when the unit is active or not.
The ADMA examines the Chain Resume bit of the ACCR when the unit is idle or upon
completion of a chain of transfers. When this bit is set, the ADMA re-reads the Next
Descriptor Address of the current chain descriptor and load it into ANDAR. The address
of the current chain descriptor is contained in ADAR. The ADMA clears the Chain
Resume bit and then examines ANDAR. When ANDAR is not zero, the ADMA reads the
chain descriptor using this new address and begin a new operation. When ANDAR is
zero, the ADMA remains or return to idle.
There are three cases to consider:
1. The ADMA completes an ADMA operation and it is not the last descriptor in the
chain. In this case, the ADMA clears the Chain Resume bit and reads the next chain
descriptor. The appended descriptor is read when the ADMA reaches the end of the
original chain.
2. The channel completes an ADMA transfer and it is the last descriptor in the chain.
In this case, the ADMA examines the state of the Chain Resume bit. When the bit is
set, the ADMA re-reads the current descriptor to get the address of the appended
chain descriptor. When the bit is clear, the ADMA returns to idle.
3. The ADMA is idle. In this case, the ADMA examines the state of the Chain Resume
bit when the ACCR is written. When the bit is set, the ADMA re-reads the last
descriptor from the most-recent chain to get the appended chain descriptor.