25.02.2015 Views

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 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PRELIMINARY DATA<br />

Key concepts 19<br />

1.2.5 Debug module<br />

The debug module manages:<br />

• The <strong>SH</strong>debug link and the debug interface to the JTAG TAP controller.<br />

Provides a connection to the <strong>SuperH</strong>yway bus, and also a route to extract trace<br />

information.<br />

• The DM_TRIN_N and the DM_TROUT_N pins.<br />

• An on-chip FIFO (known as the DM FIFO).<br />

This acts as a temporary buffer for trace messages. Trace messages from the DM<br />

FIFO can be dealt with as follows:<br />

- Sent to the selected debug interface, JTAG or <strong>SH</strong>debug link. If trace<br />

messages are generated faster than they can be transferred to the selected<br />

debug interface, either the CPU can be stalled or new trace messages can be<br />

discarded.<br />

- Accumulated in the DM FIFO until it fills. Once the DM FIFO fills, either the<br />

CPU can be stalled or new trace messages are discarded. In this mode,<br />

memory-mapped registers allow the DM FIFO contents to be read.<br />

- Old messages in the DM FIFO overwritten by new ones so that the DM FIFO<br />

contains the most recent trace messages generated. In this mode,<br />

memory-mapped registers allow the DM FIFO contents to be read.<br />

- Written to an area of the target system’s RAM (known as a trace buffer).<br />

• Trace buffer<br />

One of the available destinations for trace messages is to write these into an<br />

area of target system memory allocated as a trace buffer. Debug module register<br />

fields set the size and the base address of this trace buffer area. The size can set<br />

between <strong>64</strong> Kbytes and <strong>64</strong> Mbytes.<br />

D R A FT<br />

The trace buffer can operate in two different ways:<br />

- As circular buffer, with old entries being overwritten by new entries once the<br />

buffer fills. The buffer always contains the most recent trace messages.<br />

- As a fixed length buffer which does not wrap around. Once the buffer fills,<br />

trace messages are discarded which means that the buffer contains the<br />

earliest trace messages.<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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!