Instruction Cycle Operations
ARM7TDMI Data Sheet
ARM DDI 0029E
10-9
O
10.8 Store Register
The first cycle of a store register is similar to the first cycle of load register. During the
second cycle the base modification is performed, and at the same time the data is
written to memory. There is no third cycle.
The cycle timings are shown below in
·
Table 10-10: Store Register instruction cycle
operations
.
b, h and w are byte, halfword and word as defined in
·
Table 9-2: MAS[1:0] signal
encoding
on page 9-5.
c represents current mode-dependent value
d will either be 0 if the T bit has been specified in the instruction (eg. SDRT), or c at all
other times.
10.9 Load Multiple Registers
The first cycle of LDM is used to calculate the address of the first word to be
transferred, whilst performing a prefetch from memory. The second cycle fetches the
first word, and performs the base modification. During the third cycle, the first word is
moved to the appropriate destination register while the second word is fetched from
memory, and the modified base is latched internally in case it is needed to patch up
after an abort. The third cycle is repeated for subsequent fetches until the last data
word has been accessed, then the final (internal) cycle moves the last word to its
destination register. The cycle timings are shown in
·
Table 10-11: Load Multiple
Registers instruction cycle operations
on page 10-10.
The last cycle may be merged with the next instruction prefetch to form a single
memory N-cycle.
If an abort occurs, the instruction continues to completion, but all register writing after
the abort is prevented. The final cycle is altered to restore the modified base register
(which may have been overwritten by the load activity before the abort occurred).
When the PC is in the list of registers to be loaded the current instruction pipeline must
be invalidated.
Note
The PC is always the last register to be loaded, so an abort at any point will prevent
the PC from being overwritten.
LDM with destination = PC cannot be executed in THUMB state. However
POP{Rlist,PC}
equates to an LDM with destination=PC.
Note
Cycle
Address
MAS[1:0]
nRW
Data
nMREQ
SEQ
nOPC
nTRANS
1
pc+2L
i
0
(pc+2L)
0
0
0
c
2
alu
b/h/w
1
Rd
0
0
1
d
pc+3L
Table 10-10: Store Register instruction cycle operations