English
Language : 

SH7147 Datasheet, PDF (967/1108 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer SuperH™ RISC engine Family
Section 23 Advanced User Debugger (AUD)
In a user program, when data access to a window area is generated, AUDATA[3:0] outputs the
trace data in the order of command, accessed address, and the data contents. Similar to a branch
trace, the address sizes output (4/8/16/32 bits) are determined by comparing the upper bits of both
addresses based on the value of PFDA (the address output the previous time). The data contents
are output as they are in their access sizes (8/16/32 bits).
The algorithm is shown in figure 23.7.
[Legend]
PFDA: Data address output in 32-bit size previous time
CDA: Data address output this time
/* PFDA_enable = 0: initial value */
if(PFDA_enable == 0) {output32bit(CDA[31:0]);}
else if(PFDA[31:4] == CDA[31:4]) {output4bit(CDA[3:0]);}
else if(PFDA[31:8] == CDA[31:8]) {output8bit(CDA[7:0]);}
else if(PFDA[31:16] == CDA[31:16]) {output16bit(CDA[15:0]);}
else {output32bit(CDA[31:0]);}
PFDA_enable = 1;
PFDA = CDA; /* update PFDA */
Figure 23.7 Window Data Trace Algorithm
This algorithm can greatly reduce the amount of trace data to be output. Branch trace data is stored
in FIFO as long as FIFO has room to store it. The CPU operation when FIFO becomes full
depends on the setting of the TM bit in AUCSR.
(5) Real-Time Trace Mode
In real-time trace mode, various trace data obtained through branch trace and window data trace
are output to the outside in real time through AUDATA[3:0]. Setting the TM bit in AUCSR to 1
selects real-time trace mode.
In real-time trace mode, the CPU keeps operating while trace data is being output in the same way
as when no trace function is used. Trace events that emerge are stored in FIFO one after another as
long as FIFO has room for them, and are output outward. If FIFO has no room for them, trace
events are not stored and nothing is output outside. In this case, outside notification of a data
acquisition failure is provided through the LOST command. When the LOST command is issued,
AUDSYNC is always driven to L in the next cycle after the LOST command.
When more than one event simultaneously occur, the priority is based on the order of branch trace
and window data trace and only one selected event is stored in FIFO. In this case, the LOST
command provides outside notification that there are events not stored in FIFO.
Rev. 3.00 Oct. 06, 2008 Page 943 of 1080
REJ09B0230-0300