Instruction Cycle Timings
6-6
Copyright © 2001, 2004 ARM Limited. All rights reserved.
ARM DDI 0210C
6.4
Branch and Exchange
A
Branch and Exchange
(BX) operation takes three cycles and is similar to a branch. In
the first cycle, the branch destination and the new core state are extracted from the
register source, whilst performing a prefetch from the current PC. This prefetch is
performed in all cases, since by the time the decision to take the branch has been
reached, it is already too late to prevent the prefetch.
During the second cycle, a fetch is performed from the branch destination address using
the new instruction width, dependent on the state that has been selected.
The third cycle performs a fetch from the destination a2 or +4 (dependent on
the new specified state), refilling the instruction pipeline.
The cycle timings are listed in Table 6-3 where:
•
W and w represent the instruction width before and after the BX respectively. The
width equals four bytes in ARM state and two bytes in Thumb state. For example,
when changing from ARM to Thumb state, W equals four and w equals two
•
I and i represent the memory access size before and after the BX respectively.
MAS[1:0]
equals two in ARM state and one in Thumb state. When changing
from Thumb to ARM state, I equals one and i equals two.
•
T and t represent the state of the
TBIT
before and after the BX respectively.
TBIT
equals 0 in ARM state and 1 in Thumb state. When changing from ARM to
Thumb state, T equals 0 and t equals 1.
Table 6-3 Branch and exchange instruction cycle operations
Cycle
Address
MAS[1:0]
nRW
Data
nMREQ
SEQ
nOPC
TBI
T
1
pc + 2W
I
0
(pc+2W)
0
0
0
T
2
alu
i
0
(alu)
0
1
0
t
3
alu+w
i
0
(alu+w)
0
1
0
t
alu + 2w
Содержание ARM7TDMI
Страница 6: ...Contents vi Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 10: ...List of Tables x Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 14: ...List of Figures xiv Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 46: ...Introduction 1 26 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 120: ...Coprocessor Interface 4 18 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 142: ...Debug Interface 5 22 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 276: ...Differences Between Rev 3a and Rev 4 C 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 282: ...Glossary Glossary 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...