
Entry into Debug State
Rev. A
6-7
Copyright 2000 by LSI Logic Corporation. All rights reserved.
6.3.1 Entry into Debug State on Breakpoint
The ARM7TDMI-S core marks instructions as being breakpointed when
they enter the instruction pipeline, but the core does not enter debug
state until the instruction reaches the execute stage.
Breakpointed instructions are not executed. Instead, the ARM7TDMI-S
core enters debug state. When you examine the internal state, you see
the state before the breakpointed instruction. When your examination is
complete, remove the breakpoint. Program execution restarts from the
previously-breakpointed instruction.
When a breakpointed conditional instruction reaches the execute stage
of the pipeline, the breakpoint is always taken. The ARM7TDMI-S core
enters debug state regardless of whether the condition was met.
A breakpointed instruction does not cause the ARM7TDMI-S core to
enter debug state when:
A branch or a write to the PC precedes the breakpointed instruction.
In this case, when the branch is executed, the ARM7TDMI-S core
flushes the instruction pipeline, thereby cancelling the breakpoint.
An exception occurs, causing the ARM7TDMI-S core to flush the
instruction pipeline and cancel the breakpoint. In normal
circumstances, on exiting from an exception, the ARM7TDMI-S core
branches back to the instruction that would have next been executed
before the exception occurred. In this case, the pipeline is refilled,
and the breakpoint is reflagged.
6.3.2 Entry into Debug State on Watchpoint
Watchpoints occur on data accesses. A watchpoint is always taken, but
the core might not enter debug state immediately. In all cases, the
current instruction completes. If the current instruction is a multiword load
or store (an LDM or STM), many cycles may elapse before the
watchpoint is taken.
When a watchpoint occurs, the current instruction completes, and all
changes to the core state are made (load data is written into the
destination registers, and base write-back occurs).