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

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

66 WP channel matching<br />

1.6 WP channel matching<br />

The following subsections and diagram explain how watchpoint channel matching is<br />

achieved. Where:<br />

PRE = precondition register (WPC or DM as appropriate),<br />

ACTION = action register (WPC or DM as appropriate).<br />

1.6.1 SR.WATCH <strong>bit</strong><br />

The SR.WATCH <strong>bit</strong> is used to enable or disable all actions related to WPC-based WP<br />

channels (IA, OA, IV, BR, WPC_PERF) in both the WPC and the DM. It has no effect<br />

on the other WP channels (BRK, FPF, PL, DM).<br />

If SR.WATCH is ‘0’, all the action conditions (Section 1.5: Debug event actions on<br />

page 48) associated with all the WPC-based WP channels defined above are<br />

disabled. Thus these channel’s actions which would normally launch the event<br />

handler, affect event/performance counters, chain latches, trigger out pins or<br />

generate trace for example, will be voided.<br />

SR.WATCH is automatically cleared to ‘0’ by the hardware when launching a reset,<br />

panic or debug event handler. This allows all instructions executed within the event<br />

handler to be invisible to the debug system itself in order to prevent generation of<br />

unwanted trace, and to prevent the CPU from trying to launch a debug exception<br />

during the execution of the event handler itself.<br />

This may appear to be a nontypical situation (that is, breakpoints would not be set<br />

in the debug event handler code), but unexpected exceptions might occur due to<br />

“wide” programming of IA/OA and particularly IV watchpoint channels.<br />

Event handler software should re-enable action conditions by restoring SR.WATCH to<br />

‘1’ when leaving its critical region. This is achieved using the RTE instruction to<br />

write the contents of the saved status register (SSR) to the status register (SR). This<br />

will not result in the BR channel triggering for the branch caused by the RTE<br />

instruction, as the state of SR.WATCH is considered at the start of an RTE<br />

instruction’s execution (see WP channel type BR on page 156).<br />

D R A FT<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

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

Saved successfully!

Ooh no, something went wrong!