ARM ARM7TDMI User Manual Page 185

  • Download
  • Add to my manuals
  • Print
  • Page
    / 242
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 184
Instruction Cycle Timings
ARM DDI 0234B Copyright © 2001 ARM Limited. All rights reserved. 7-7
7.3 Branch and ARM branch with link
Any ARM or Thumb branch, and an ARM branch with link operation takes three
cycles:
1. During the first cycle, a branch instruction calculates the branch destination while
performing a prefetch from the current PC. This prefetch is done in all cases
because, by the time the decision to take the branch has been reached, it is already
too late to prevent the prefetch.
2. During the second cycle, the ARM7TDMI-S core performs a Fetch from the
branch destination. The return address is stored in r14 if the link bit is set.
3. During the third cycle, the ARM7TDMI-S core performs a Fetch from the
destination + i, refilling the instruction pipeline. When the instruction is a branch
with link, r14 is modified (4 is subtracted from it) to simplify return to
MOV PC,R14.
This modification ensures subroutines of the type
STM..{R14} LDM..{PC}
work
correctly.
Table 7-3 shows the cycle timings, where:
pc Is the address of the branch instruction.
pc’ Is an address calculated by the ARM7TDMI-S core.
(pc’) Are the contents of that address.
Note
This data applies only to branches in ARM and Thumb states, and to branch with link
in ARM state.
Table 7-3 Branch instruction cycle operations
Cycle Address Size Write Data TRANS[1:0] Prot0
1 pc+2i w/h 0 (pc + 2i) N cycle 0
2 pc w’/h’ 0 (pc’) S cycle 0
3 pc’+i w’/h’ 0 (pc’ + i) S cycle 0
pc’+2i w’/h’ - - - -
Page view 184
1 2 ... 180 181 182 183 184 185 186 187 188 189 190 ... 241 242

Comments to this Manuals

No comments