Functional Description and Application Information
S12S Debug (S12SDBGV1) Module
MM912F634
Freescale Semiconductor
241
4.31.4.6
Tagging
A tag follows program information as it advances through the instruction queue. When a tagged instruction reaches the head of
the queue, a tag hit occurs and can initiate a state sequencer transition.
Each comparator control register features a TAG bit, which controls whether the comparator match causes a state sequencer
transition immediately or tags the opcode at the matched address. If a comparator is enabled for tagged comparisons, the
address stored in the comparator match address registers must be an opcode address.
Using Begin trigger together with tagging, if the tagged instruction is about to be executed, then the transition to the next state
sequencer state occurs. If the transition is to the Final State, tracing is started. Only upon completion of the tracing session can
a breakpoint be generated. Using End alignment, when the tagged instruction is about to be executed and the next transition is
to Final State, then a breakpoint is generated immediately before the tagged instruction is carried out.
R/W monitoring is not useful for tagged operations, since the taghit occurs based on the tagged opcode reaching the execution
stage of the instruction queue. Similarly access size (SZ) monitoring and data bus monitoring is not useful if tagging is selected,
since the tag is attached to the opcode at the matched address, and is not dependent on the data bus nor on the size of access.
Thus these bits are ignored if tagging is selected.
When configured for range comparisons and tagging, the ranges are accurate only to word boundaries.
Tagging is disabled when the BDM becomes active.
4.31.4.7
Breakpoints
It is possible to generate breakpoints from channel transitions to Final State or using software to write to the TRIG bit in the
DBGC1 register.
4.31.4.7.1
Breakpoints From Comparator Channels
Breakpoints can be generated when the state sequencer transitions to the Final State. If configured for tagging, then the
breakpoint is generated when the tagged opcode reaches the execution stage of the instruction queue.
If a tracing session is selected by the TSOURCE bit, breakpoints are requested when the tracing session has completed, thus if
Begin aligned triggering is selected, the breakpoint is requested only on completion of the subsequent trace (see
Table 317). If
no tracing session is selected, breakpoints are requested immediately.
If the BRK bit is set, then the associated breakpoint is generated immediately independent of tracing trigger alignment.
Table 317. Breakpoint Setup For CPU Breakpoints
BRK
TALIGN
DBGBRK
Breakpoint Alignment
0
Fill Trace Buffer until trigger, then disarm (no breakpoints)
0
1
Fill Trace Buffer until trigger, then breakpoint request occurs
0
1
0
Start Trace Buffer at trigger (no breakpoints)
0
1
Start Trace Buffer at trigger
A breakpoint request occurs when Trace Buffer is full
1
x
1
Terminate tracing and generate breakpoint immediately on trigger
1
x
0
Terminate tracing immediately on trigger