Bennett/General User Manual/Watchpoint

From Engineering Wiki
Jump to navigation Jump to search

Watchpoints

Watchpoints can be added via Bennett for hardware that supports these features. Currently, this is the COMP22712 lab board and COMP15111 emulator.

To create a watchpoint Right click on the memory address that you would like to watch.

This will create a watchpoint at that address. This watchpoint will be included in the watchpoint display window (if this doesn't appear, it can be added via the Window menu.)

The Address, Address mask and control register of the watchpoint can be edited from the watchpoint display window. Simply click on the value you wish to change and enter a new value (in hexadecimal).

For example, a watchpoint with address 0x40 and address mask 0xffff_fff0 would trap for any reads/writes into 0x40-0x4F.

When running the processor, the processor will halt if a watchpoint traps. Bennett will let you know in the status message in the top left part of the UI. You should see **Stopped (Watchpoint)**

COMP22712

Specific details for COMP22712 are included in this section. In particular, the control register can be edited via the watchpoint interface for more control of the watchpoint functionality.

Watchpoints upon creation will trap for loads and stores and in all operating modes.

There are currently a maximum of 4 watchpoints available at any given point in time; extra watchpoint creation requests will be ignored once 4 are active.

Control Register bit map
Bit Description (active high)
0 trap on load
1 trap on load
2 unused
3 unused
4 trap on byte transfer (sb/lb)
5 trap on half word transfer (sh/lh)
6 trap on word transfer (sw/lw)
7 unused
8 trap in user mode
9 trap in supervisor mode
10 unused
11 trap in machine mode