SuperH (SH) 64-bit RISC Series SH-5 System Architecture, Volume ...
SuperH (SH) 64-bit RISC Series SH-5 System Architecture, Volume ...
SuperH (SH) 64-bit RISC Series SH-5 System Architecture, Volume ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PRELIMINARY DATA<br />
88 Debug module<br />
This facility will be used to implement efficient tool/target data communications.<br />
This operation will typically be performed in an environment where tracing may<br />
also be performed at the same time. Thus, it is sensible if the fast printf data is<br />
always written directly to the debug port to avoid interfering with the FIFO<br />
operation.<br />
1.8.3 DM FIFO/trace buffer in target system memory<br />
Note:<br />
The debug module contains a FIFO (see Section 4.1.5: DM FIFO on page 246) which<br />
holds trace messages awaiting transmission to the tool, or waiting to be written into<br />
a trace buffer in the target system’s memory.<br />
The DM.TRCTL.DESTN (Section 1.8.10: DM.TRCTL (trace/trigger register) on page 97)<br />
determines one of the following actions for all trace data loaded into the DM FIFO:<br />
• Trace messages in the DM FIFO are sent to the tool using the currently-selected<br />
debug interface (known as “trace link” mode).<br />
• Trace messages in the DM FIFO are written into an area of target system memory<br />
assigned as a trace buffer (known as “trace buffer” mode). The DM.TRBUF register<br />
(Table 32 on page 107) allows this to be further selected as either “circular trace<br />
buffer” mode or “trace buffer hold” mode. The format is which the trace messages<br />
are written is described in Section 1.8.12: DM.TRPTR (trace pointer register) on<br />
page 110.<br />
In “trace buffer” mode the DM writes the trace messages to target system memory<br />
using <strong>SuperH</strong>yway Store8/16/32 transactions. These transactions are visible to the<br />
<strong>SuperH</strong>yway bus analyzers (see Chapter 2: <strong>SuperH</strong>yway bus analyzer on page 179),<br />
and thus if a bus analyzer is programmed such that it will match on these<br />
transactions, an infinite number of bus analyzer hits (and thus an infinite number of<br />
trace message) will be generated.<br />
• Trace messages remain in the DM FIFO until read by the CPU or by the tool<br />
(known as “DM FIFO trace hold” mode).<br />
D R A FT<br />
• old messages in the DM FIFO are overwritten by new ones so that the DM FIFO<br />
contains the most recent trace messages generated (known as “circular DM FIFO”<br />
mode).<br />
<strong>SuperH</strong>, Inc.<br />
<strong>SH</strong>-5 <strong>System</strong> <strong>Architecture</strong>, <strong>Volume</strong> 3: Debug 05-SA-10003 v1.0