2.8.3. Operation of data value comparators, in ETMv3.3 and later

To explain how data value comparisons work from ETMv3.3, this section describes cases when the access value can match the comparison value. It describes the use of a single address comparator, and also the use of address range comparators. In each case it considers each of the different possible comparison sizes:

For each comparison size it indicates what accesses can generate a match, and which accesses never match. It also describes any special programming requirements for the comparator registers to enable correct matching.

Data value matching with single address comparators

The accesses for which a match occurs are:

Comparison size = byte

A match occurs for the following accesses, if the access value matches the comparison value:

  • a byte access to the comparison address

  • a halfword or word access to the comparison address

  • a halfword or word access to a lower address, where the access overlaps the comparison address.

To achieve this matching behavior you must:

  • program the same value into all four bytes of the ETMDCVR

  • program the same mask value into all four bytes of the ETMDCMR.

Comparison size = halfword

A match occurs for the following accesses, if the access value matches the comparison value:

  • A halfword access to the comparison address.

  • A word access to the comparison address.

  • A word access to ((comparison address) -2). This means that the most significant halfword of the access overlaps the comparison address, and is a halfword aligned access.

To achieve this matching behavior you must:

  • program the same value into the top and bottom halfwords of the ETMDCVR

  • program the same mask value into the top and bottom halfwords of the ETMDCMR.

No other access can match. In particular, accesses that overlap the comparison address but that are not halfword aligned with that address do not match. For example, a word access to ((comparison address) -2) never matches.

Comparison size = word

A match occurs only if there is a word access to the comparison address and the access value matches the comparison value.

Constraints and rules for data value matching with single address comparators

The described operation of data matching with single address comparators can be summarized by two constraints and two rules.

The two constraints are:

  • The alignment of the comparison address must correspond to the comparison size:

    • if the comparison size is halfword the address must be halfword aligned

    • if the comparison size is word the address must be word aligned.

  • If the comparison size is byte or halfword the same values must be written into all bytes, or halfwords, of the ETMDCVR and the ETMDCMR.

The two rules are:

  • the comparator does not match if the access size is smaller than the comparison size

  • the comparator does not match on accesses that are not aligned appropriately for the comparison size:

    • if the comparison size is halfword matches can only occur if the access is halfword aligned

    • if the comparison size is word matches can only occur if the access is word aligned.

Data value matching with address range comparators

An address range comparator is constructed from a pair of single address comparators. In particular, the address matching of an address range comparator depends on the address matching of the two single address comparators, and therefore follows the address matching behavior described in Data value matching with single address comparators. See also Address matching of an address range comparator.

However, with address range comparators that are configured for data value matching, the data value matching is only based on the first of the single address comparators. This is the comparator that defines the lower address, the start address, of the address range. See Data value matching of an address range comparator for more information.

The constraints and rules that apply to data value matching with address range comparators are given in Constraints and rules for data value matching with address range comparators.

Address matching of an address range comparator

An address range comparator take the greater than or equal to (>=) outputs from a pair of single address comparators. The address range comparator matches if both:

  • the >= output from the low address comparator is HIGH, indicating a match

  • the >= output from the high address comparator is LOW, indicating no match.

When a pair of single address comparators are used to form an address range comparator, most fields of the low address and high address ETMACTRs must be programmed with identical values. See About the address comparator registers. This means that qualifiers that might prevent a match apply to both of the single comparators. For example, when you want an address range comparator to match only in Secure state, both comparators are programmed to match only on Secure accesses. This is done by setting bits [11:10] of both ETMACTRs to b10.

Data value matching of an address range comparator

When you are performing data value matching with an address range comparator, the data value matching is only performed as part of the operation of the low address comparator. There is no data value matching associated with the high address comparator. If the data value comparison for the low address comparator means that the comparator does not match then the result of the high address comparator is irrelevant. However, the rules for data value matching for address range comparators are slightly different to those for single address comparators, and are given in Constraints and rules for data value matching with address range comparators.

Constraints and rules for data value matching with address range comparators

The operation of data value matching with address range comparators can be summarized by two constraints and two rules.

The two constraints are:

  • The alignment of the comparison addresses must correspond to the comparison size:

    • if the comparison size is halfword the addresses must be halfword aligned

    • if the comparison size is word the addresses must be word aligned.

  • If the comparison size is byte or halfword the same values must be written into all bytes, or halfwords, of the ETMDCVR and the ETMDCMR.

    Note

    The data value comparison is only defined for the low address comparator.

These constraints are the same as the constraints for data value matching with single address comparators.

The two rules are:

  • The address range comparator does not match if the access size is different to the comparison size.

  • The comparator does not match on accesses that are not aligned appropriately for the comparison size:

    • if the comparison size is halfword matches can only occur if the access is halfword aligned

    • if the comparison size is word matches can only occur if the access is word aligned.

    This rule also applies to data value matching with a single address comparator.

The first of these rules means that data value matching is more restricted with address range comparators than it is with single address comparators. For example, if the comparison size is configured as byte:

Note

All ETMs treat doubleword transfers as two separate word transfers. Therefore, an address range comparator with data value comparison configured to match on word accesses also matches on doubleword accesses.

Copyright © 1999-2002, 2004-2009, 2011 ARM Limited. All rights reserved.ARM IHI 0014Q
Non-ConfidentialID101211