2.5.2. Example pushed operations

These are two examples using this specific implementation of ADIv5.1. All register and feature references are related to those described in their respective chapters and the ARM Debug Interface v5 Architecture Specification and the ARM Debug Interface v5.1 Architecture Supplement.

This section contains two examples:

Example use of pushed verify operation on an AHB-AP

You can use pushed verify to verify the contents of system memory as follows:

  1. Make sure that the AHB-AP Control/Status Word (CSW) is set up to increment the Transfer Address Register (TAR) after each access.

  2. Write to the TAR to indicate the start address of the Debug Register region that is to be verified.

  3. Write a series of expected values as access port transactions. On each write transaction, the debug port issues an access port read access, compares the result against the value supplied in the access port write transaction, and sets the STICKYCMP bit in the CRL/STAT Register if the values do not match. The TAR is incremented on each transaction.

In this way, the series of values supplied is compared against the contents of the access port locations, and STICKYCMP set if they do not match.

Example use of pushed find operation on an AHB-AP

You can use pushed find to search system memory for a particular word. If you use pushed find with byte lane masking you can search for one or more bytes.

  1. Make sure that the AHB-AP Control/Status Word (CSW) is set up to increment the TAR after each access.

  2. Write to the TAR to indicate the start address of the Debug Register region that is to be searched.

  3. Write the value to be searched for as an AP write transaction. The debug port repeatedly reads the location indicated by the TAR. On each debug port read:

    • The value returned is compared with the value supplied in the access port write transaction. If they match, the STICKYCMP flag is set.

    • The TAR is incremented.

This continues until STICKYCMP is set, or ABORT is used to terminate the search.

You could also use pushed find without address incrementing to poll a single location, for example to test for a flag being set on completion of an operation.

Copyright © 2004-2009 ARM. All rights reserved.ARM DDI 0314H
Non-Confidential