Bennett/General User Manual/Watchpoint: Difference between revisions
| Line 18: | Line 18: | ||
=== COMP22712 === | === COMP22712 === | ||
Specific details for COMP22712 are here. | |||
controls[11] = mMode; | |||
controls[10] = true; | |||
controls[9] = sMode; | |||
controls[8] = uMode; | |||
controls[7] = true; | |||
controls[6] = word; | |||
controls[5] = halfword; | |||
controls[4] = byte; | |||
controls[3] = 0; | |||
controls[2] = 0; | |||
controls[1] = load; | |||
controls[0] = store; | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ Co | ||
|- | |- | ||
! | ! Bit !! Description | ||
|- | |- | ||
| | | 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 | ||
|- | |- | ||
|} | |} | ||
Revision as of 09:52, 23 January 2026
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. This allows you to change the address, or increase the memory window, which will be written to.
For example, a watchpoint with address 0x40 and address mask 0xffff_fff0 would trap for any reads/writes into 0x40-0x4F.



COMP22712
Specific details for COMP22712 are here.
controls[11] = mMode; controls[10] = true; controls[9] = sMode; controls[8] = uMode;
controls[7] = true; controls[6] = word; controls[5] = halfword; controls[4] = byte; controls[3] = 0; controls[2] = 0; controls[1] = load; controls[0] = store;
| Bit | Description |
|---|---|
| 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 |