Typewriter User Manual

MOTOROLA MC68340 USER’S MANUAL 6- 35
This register is decremented by 1, 2, or 4 for each successful operand transfer from
source to destination locations. When the BTC decrements to zero and no error has
occurred, the CSR DONE bit is set. In the external request mode, the
DONE handshake
line is also asserted when the BTC is decremented to zero.
If the operand size is byte, then the register is always decremented by 1. If the operand
size is word and the starting count is even word, the register is decremented by 2. If the
operand size is word and the byte count is not a multiple of 2, the CSR CONF bit is set,
and a transfer does not occur. If the operand size is long word and the count is even long
word, then the register is decremented by 4. If the operand size is long word and the byte
count is not a multiple of 4, the CSR CONF bit is set, and a transfer does not occur. If the
STR bit is set with a zero count in the BTC, the CONF bit is set, and the STR bit is
cleared.
When read, this register always contains the count for the next access. If a bus error
terminates the transfer, this register contains the count for the next access that would
have been run had the error not occurred.
6.8 DATA PACKING
The internal DHR is a 32-bit register that can serve as a buffer register for the data being
transferred during dual-address DMA cycles. No address is specified since this register
can not be addressed by the programmer. The DHR allows the data to be packed and
unpacked by the DMA during the dual-address transfer. For example, if the source
operand size is byte and the destination operand size is word, then two-byte read cycles
occur, followed by a one-word write cycle (see Figure 6-16). The two bytes of data are
buffered in the DHR until the destination (write) word cycle occurs. The DHR allows for
packing and unpacking of operands for the following sizes: bytes to words, bytes to long
words, words to long words, words to bytes, long words to bytes, and long words to words.
.. ...................
BYTE0
BYTE1
BYTE0
BYTE1
BYTE2
BYTE3
BYTE0
BYTE2
BYTE1
BYTE3
BYTE0 BYTE1 BYTE2 BYTE3
BYTE0 BYTE1 BYTE2 BYTE3
BYTE0 BYTE1
SOURCE/DESTINATION DESTINATION/SOURCE
Figure 6-16. Packing and Unpacking of Operands
Frees
cale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...