171
CHAPTER 2 DEPENDENCE FUNCTIONS
2.3.6.2 Multi Trace
Only when an event trigger occurred, the multi trace samples data before and after the
event trigger.
■ Multi Trace
To use the multi trace function, the SET MODE command is set to the following mode.
Debug function: "Trace Enhancement" mode
Event mode: "Multi trace" mode
The multi trace samples data where an event trigger (trace end trigger) occurs before and after the event
trigger.
It can be used for tracing required only when a certain variable access occurs, instead of continuous tracing.
The trace data sampled at one event trigger is called a block. The trace buffer for multi trace in MB2147-01
can hold 64K frames. When dividing into blocks, select the size of one block from 128/256/512/1024 frame.
64 to 512 blocks can be sampled according to the block size.
There are the following two event triggers of the multi trace.
• Trace end trigger: Change to the next block in the point that becomes a hit.
• Multi trace end trigger: Terminate the trace acquisition in the point that becomes a hit.
Figure 2.3-4 Multi Trace Sampling
■ Multi Trace Frame Number
Data of 128 to 1024 frames can be sampled according to the block size at each time an event occurs (trace
end trigger). This data unit is called a block, and each sampled block is numbered starting from 0. This is
called the block number.
A block is a collection of sampled data before and after the event trigger occurs. At the event trigger is 0,
trace data sampled before reaching the event trigger point is numbered negatively, and trace data sampled
after the event trigger point is numbered positively. These frame numbers are called local numbers (See
Figure 2.3-5).
In addition to this local number, there is another set of frame numbers starting 1 with the oldest data in the
trace buffer. This is called the global number. Since the trace buffer can hold 64K frames, frames are
numbered 1 to 65536 (See Figure 2.3-5).
To specify which frame data is displayed, use the global number or block and local numbers.
Start
execution
↓
Program flow
Trace buffer
Block
Event 1
↓
Event 2
↓
Event 3
↓