5- 14
M68020 USER’S MANUAL
MOTOROLA
5.2.2 Misaligned Operands
Since operands may reside at any byte boundary, they may be misaligned. A byte
operand is properly aligned at any address; a word operand is misaligned at an odd
address; a long word is misaligned at an address that is not evenly divisible by four. The
MC68000, MC68008, and MC68010 implementations allow long-word transfers on odd-
word boundaries but force exceptions if word or long-word operand transfers are
attempted at odd-byte addresses. Although the MC68020/EC020 does not enforce any
alignment restrictions for data operands (including PC relative data addresses), some
performance degradation occurs when additional bus cycles are required for long-word or
word operands that are misaligned. For maximum performance, data items should be
aligned on their natural boundaries. All instruction words and extension words must reside
on word boundaries. Attempting to prefetch an instruction word at an odd address causes
an address error exception.
Figure 5-9 shows the transfer (write) of a long-word operand to an odd address in word-
organized memory, which requires three bus cycles. For the first cycle, SIZ1 and SIZ0
specify a long-word transfer, and A2–A0 = 001. Since the port width is 16 bits, only the
first byte of the long word is transferred. The slave device latches the byte and
acknowledges the data transfer, indicating that the port is 16 bits wide. When the
processor starts the second cycle, SIZ1 and SIZ0 specify that three bytes remain to be
transferred with A2–A0 = 010. The next two bytes are transferred during this cycle. The
processor then initiates the third cycle, with SIZ1 and SIZ0 indicating one byte remaining
to be transferred with A2–A0 = 100. The port latches the final byte, and the operation is
complete. Figure 5-10 shows the associated bus transfer signal timing. Figure 5-11 shows
the equivalent operation for a data read cycle.
DATA BUS
D31
D16
LONG-WORD OPERAND
OP0
OP1
OP2
OP3
31
0
WORD MEMORY
MSB
LSB
XXX
OP0
OP1
OP2
MC68020/EC020
SIZ1
SIZ0
A2
A1
0
1
0
1
MEMORY CONTROL
DSACK1
DSACK0
L
H
L
H
OP3
XXX
A0
1
0
1
0
L
H
Figure 5-9. Misaligned Long-Word Operand Write to Word Port Example
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.