GTM Development Interface (GTMDI)
may be changed in the middle of a program execution, program fetch trace may be enabled
or disabled during program execution as well.
42.6.9.2
Fetch trace state machine
The fetch trace state machine is composed basically by three states: start, running and end.
When the fetch trace is enabled, fetch state machine goes to the start state.
describes the fetch trace machine state diagram.
not fetch or (fetch + buffer full)
trace buffer disabled
End
trace buffer full
42.6.9.2.1 Fetch trace start state
In this state, the fetch trace logic waits for a fetch access to occur. When a fetch access
occurs, the fetch trace logic tries to insert (into the corresponding MCS trace buffer) a fetch
trace message with FSCNT=0 and the FADDR field equal to the fetch access address. It is
possible that the corresponding MCS trace message buffer is full when fetch trace logic tries
to insert the message. In this case, the fetch trace logic ignores the current fetch access,
does not generate any error, and tries again when another fetch access occurs.
After inserting a message into the buffer, the fetch trace state machine goes to the running
state.
It is also possible that the fetch trace is disabled before a message is inserted into the MCS
trace buffer. In this case state machine goes to the end state
42.6.9.2.2 Fetch trace running state
When the fetch trace state machine enters in the running state a counter, called CNT, is
initialized to 1 and starts counting the number of sequential instruction fetch accesses.
When a fetch access with address ADDR is detected, the fetch trace logic tests if ADDR is
equal to the previous fetch address, ADDR_PRV, +1 (ADDR = ADDR_PRV + 1). If so, no
message is buffered for transmission and CNT increments by 1 (CNT = CNT + 1).
Otherwise, if ADDR is not a sequential address, a fetch trace message is generated with the
FSCNT field equals to the CNT counter value (FSCNT = CNT) and FADDR equals to the
current address ADDR. The CNT counter is then initialized to 1.
958/2058
Figure 464. Fetch trace state machine state diagram
Start
trace buffer not full
trace buffer disabled
DocID027809 Rev 4
fetch + successful trace buffer entry
fetch + trace buffer full
RM0400
Figure 464
Running
fetch +
successful trace
buffer entry
Need help?
Do you have a question about the SPC572L series and is the answer not in the manual?
Questions and answers