Data Packing; Packing And Unpacking Of Operands - Motorola MC68340 User Manual

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

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.
SOURCE/DESTINATION
BYTE0
BYTE1
BYTE0
BYTE1
BYTE2
BYTE3
BYTE0
BYTE2
Figure 6-16. Packing and Unpacking of Operands
MOTOROLA
Freescale Semiconductor, Inc.
BYTE1
BYTE3
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
DESTINATION/SOURCE
. . . . . . . . . . . . . . . . . . . . .
BYTE0
BYTE1
BYTE0
BYTE1
BYTE2
BYTE0
BYTE1
BYTE2
BYTE3
BYTE3
6- 35

Advertisement

Table of Contents
loading

Table of Contents