5.6 Watchpoint setup

This section describes how to enable a single watchpoint compare result to be correctly configured at the watchpoint and transferred over the DTB to the DEM, where it can potentially cause a DBGWATCHTRIGREQ assertion.

To enable a watchpoint, complete the following procedure:

Procedure

  1. Set up the DEM output:
    1. In the Active DSM register, active_dsm, write the XP ID of the XP driving the signals, for precise event timing.
    2. Write to the Trigger Control register, trigger_ctl, to select which DTB bits are included in the DBGWATCHTRIGREQ assertion.
    3. In the Timer Value register, timer_val, write the delay between the DTB event and the assertion of DBGWATCHTRIGREQ, if required.
  2. Set up the DWM in the XP:
    1. In the Debug and Trace Configuration register, dt_config, select watchpoint 0 or 1 and which DTB bit to drive on the XP originating the DTB event. You must do this on all intervening XPs to ensure that driving and pass-through are as required at the DEM.
    2. In the Debug and Trace Interface Select register, dt_interface_sel, select:
      • XP device port 0 or 1.
      • Channel type. This can be REQ, SNP, RSP, or DATA.
      • Direction, either transmit or receive, on which the watchpoint compare is active.
    3. In the Debug and Trace Comparison Low Value * register, dt_cmp_val*_l, and the Debug and Trace Comparison High Value * register, dt_cmp_val*_h, write the value for fields to be compared in the watchpoint.
    4. In the Debug and Trace Comparison Low Mask * register, dt_cmp_mask*_l, or the Debug and Trace Comparison High Mask * register, dt_cmp_mask*_h register, write the mask to determine which flit-fields are compared in the watchpoint.
    5. In the Debug and Trace Control register, dt_control, set up snapshotting of flit contents on watchpoint match, if required.
  3. Enable the watchpoint or trigger:
    1. Write to the trigger_ctl register to enable DBGWATCHTRIGREQ generation.
    2. Write to the dt_control register to enable the relevant watchpoints for all XPs, starting at XP5 and progressing in a clockwise direction.
  4. When a DTB event occurs:
    Trigger indication is delivered by DBGWATCHTRIGREQ.
    1. The responder reads the Trigger Status register, trigger_status, to identify which DTB bits contributed to the DBGWATCHTRIG assertion.
    2. The responder reads out the flit information stored in the dt_cmp_val*_l and dt_cmp_val*_h registers. This is the first flit that triggered the watchpoint match.
Non-ConfidentialPDF file icon PDF versionARM 100052_0001_00_en
Copyright © 2014, 2015, 2017 ARM Limited or its affiliates. All rights reserved.