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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
PRELIMINARY DATA<br />
Debug module 91<br />
Stall/discard overview<br />
The DM.TRCTL register (see Section 1.8.10: DM.TRCTL (trace/trigger register) on<br />
page 97) has a field (DM.TRCTL.STALL_MODE) which determines the action if there is<br />
no space available in the capture buffer at the time a WPC watchpoint hit or BR<br />
watchpoint hit occurs. The two possible actions are:<br />
• stall the CPU until space becomes available in the capture buffer or<br />
• discard watchpoint hits which are unable to be written to the capture buffer.<br />
All actions (other than controlling the non-BR hit trigger-out signal) are performed<br />
at the output of the capture buffer. This means that in stall mode (see<br />
Table 31: DM.TRCTL definition on page 97), actions will be delayed when the<br />
capture buffer fills and the processor stalls. In discard mode, when the capture<br />
buffer fills, the following occur until space becomes available:<br />
• subsequent watchpoint hits will be discarded,<br />
When space does become available in the capture buffer, the next trace message<br />
generated due to a WP hit will have its overstall <strong>bit</strong> set to 1 to denote that WP<br />
hits have been lost.<br />
• DM ACTION_CHAIN_ALTER actions for IA/IV/OA/BR hits are voided,<br />
• ACTION_TRIG_OUT actions for BR hits are voided,<br />
• ACTION_TRACE actions for IA/IV/OA/BR hits are voided.<br />
(WPC ACTION_CHAIN_ALTER actions for IA/IV/OA hits are performed normally in<br />
this situation and are not voided.)<br />
Generation of trigger-out pulses for IA/IV/OA hits is performed at the input to the<br />
capture buffer, and thus is performed even in discard mode. However, the length of<br />
the trigger-out pulse can cover several distinct WP hits occurring.<br />
Stall mode<br />
D R A FT<br />
The CPU pipeline cannot be instantly stalled. When a stall signal from the DM is<br />
asserted, the pipeline stops fetching new instructions which causes the pipeline to<br />
empty an implementation defined number of clock cycles later (see DM FIFO<br />
high-water mark on page 246). Only at this time is the CPU stalled and unable to<br />
generate any more watchpoint hits.<br />
The determination of the size of the capture buffer must allow for this CPU stall<br />
latency. The capture buffer includes “high-water” detection logic which asserts the<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