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 />
Debug module 87<br />
• Write trace messages into a trace buffer in the target system’s memory.<br />
• Set and clear any of the chain-latches in the debug module.<br />
• Control the trigger-out signal (DM_TROUT_N).<br />
• Route <strong>SuperH</strong>yway bus transactions to or from the tool using either the<br />
<strong>SH</strong>debug link or the JTAG debug interface.<br />
1.8.1 Address spaces<br />
The debug module is assigned 32 Mbytes of <strong>SuperH</strong>yway target address space. 16<br />
Mbytes of this consists of DM registers, the other 16 Mbytes is mapped to the tool<br />
via the <strong>SH</strong>debug link/JTAG port.<br />
1.8.2 Fast printf<br />
Fast printf is an extremely simple and powerful technique in which the processor<br />
emits a piece of data and the current PC value whenever a program writes to a<br />
special CPU register. External hardware and software print this data as requested<br />
by the programmer, usually in the “console” window of a graphical debugger<br />
running on a tool. Support of fast printf requires enhancements to the programming<br />
tools, as well as appropriate debugging facilities. The fast printf function allows a<br />
programmer to embed fast printf code into programs and probe any register or<br />
memory contents.<br />
The fast printf function is part of the debug module logic and uses the DM.FPF<br />
register. Whenever the DM.FPF register is written, the debug module creates a trace<br />
message containing the program counter, ASID and the data value. This trace<br />
message is sent directly to the tool, bypassing the DM FIFO, irrespective of how the<br />
trace destination is configured. The FPF trace message is sent to the tool at the first<br />
opportunity, that is, immediately following any other trace message currently being<br />
sent.<br />
D R A FT<br />
Writes to the DM.FPF register are treated differently from writes to other<br />
<strong>SuperH</strong>yway bus registers. The debug module delays the <strong>SuperH</strong>yway bus response<br />
to such writes until the FPF trace message has been sent to the tool.<br />
The fast printf function is available as a WP channel (see Section 1.4: Watchpoint<br />
channels on page 35). This allows its operation to be selectively enabled and<br />
disabled by one of the chain latches.<br />
05-SA-10003 v1.0<br />
<strong>SuperH</strong>, Inc.<br />
<strong>SH</strong>-5 <strong>System</strong> <strong>Architecture</strong>, <strong>Volume</strong> 3: Debug