Memory Interface
ARM7TDMI Data Sheet
ARM DDI 0029E
6-9
O
6.4
Data Transfer Size
In an ARM7TDMI system, words, halfwords or bytes may be transferred between the
processor and the memory. The size of the transaction taking place is determined by
the
MAS[1:0]
pins. These are encoded as follows:
MAS[1:0]
00
01
10
11
Byte
halfword
word
reserved
The processor always produces a byte address, but instructions are either words (4
bytes) or halfwords (2 bytes), and data can be any size. Note that when word
instructions are fetched from memory,
A[1:0]
are undefined and when halfword
instructions are fetched,
A[0]
is undefined. The
MAS[1:0]
outputs share the same
timing as the address bus and thus can be modified by the use of
ALE
and
APE
as
described in
·
6.3 Address Timing
on page 6-4.
When a data read of byte or halfword size is performed (eg LDRB), the memory
system may safely ignore the fact that the request is for a sub-word sized quantity and
present the whole word. ARM7TDMI will always correctly extract the addressed byte
or halfword from the data. The memory system may also choose just to supply the
addressed byte or halfword. This may be desirable in order to save power or to simplify
the decode logic.
When a byte or halfword write occurs (eg STRH), ARM7TDMI will broadcast the byte
or halfword across the whole of the bus. The memory system must then decode
A[1:0]
to enable writing only to the addressed byte or halfword.
One way of implementing the byte decode in a DRAM system is to separate the 32-bit
wide block of DRAM into four byte wide banks, and generate the column address
strobes independently as shown in
·
Figure 6-7: Decoding byte accesses to memory
on page 6-11.
When the processor is configured for Little Endian operation, byte 0 of the memory
system should be connected to data lines 7 through 0 (
D[7:0]
) and strobed by
nCAS0
.
nCAS1
drives the bank connected to data lines 15 though 8, and so on. This has the
added advantage of reducing the load on each column strobe driver, which improves
the precision of this time-critical-signal.
In the Big Endian case, byte 0 of the memory system should be connected to data lines
31 through 24
.