
Caches and Write Buffer
4-14
Copyright 1999, 2000 ARM Limited. All rights reserved.
ARM DDI 0144B
4.4.3
Buffered writes
The write buffer is non-merging, so even if two separate buffered external memory
writes are performed that are sequentially related, they still take two address locations
within the buffer, and are treated as nonsequential accesses. This is also true for
non-word writes to the same word address. In this instance two address and two data
locations are used in the write buffer.
The write buffer splits any accesses caused by an
STM
instruction on 4-word boundaries.
Each set of words uses one address location in the write buffer. This mechanism allows
privileges to be rechecked in the case where the access crosses a memory region and the
memory region privileges might change, therefore protecting any regions of reserved
memory.
Figure 4-3 on page 4-14 shows the write buffer behavior for the following code
sequence:
MOV
MOV
STMIA
STMIA
r11, #0x10c
r12, #0x20c
r11, {r0-r5}
r12, {r6-r10}
; set pointer
; set pointer
; store 6 registers
; store 5 registers
Figure 4-3 Write buffer allocation
In this code, a pointer has been set to address
0x10C
. A store multiple of six registers is
then executed. This instruction uses six data registers, and three address registers within
the write buffer. Another store to address
0x20c
is then executed using the remaining
address location. The internal ARM9TDMI is then stalled until an address register
becomes free.
Note
When a cache line is evicted from the DCache to the write buffer, it only uses one
address register, because cache lines are aligned to 4-word boundaries.
Data register
Empty R6
R5
R4
R3
R2
R1
R0
Address register
0x20C
0x120
0x110
0x10C
Address
incrementer
ARM9TDMI
DD[31:0]
ARM9TDMI
DA[31:0]
BD[31:0]
BA[31:0]