S12S Debug Module (S12SDBGV2)
S12P-Family Reference Manual, Rev. 1.13
178
Freescale Semiconductor
6.4.2.1.4
Comparator A Data Bus Comparison NDB Dependency
Comparator A features an NDB control bit, which allows data bus comparators to be congured to either
trigger on equivalence or trigger on difference. This allows monitoring of a difference in the contents of
an address location from an expected value.
When matching on an equivalence (NDB=0), each individual data bus bit position can be masked out by
clearing the corresponding mask bit (DBGADHM/DBGADLM) so that it is ignored in the comparison. A
match occurs when all data bus bits with corresponding mask bits set are equivalent. If all mask register
bits are clear, then a match is based on the address bus only, the data bus is ignored.
When matching on a difference, mask bits can be cleared to ignore bit positions. A match occurs when any
data bus bit with corresponding mask bit set is different. Clearing all mask bits, causes all bits to be ignored
and prevents a match because no difference can be detected. In this case address bus equivalence does not
cause a match.
6.4.2.2
Range Comparisons
Using the AB comparator pair for a range comparison, the data bus can also be used for qualication by
using the comparator A data registers. Furthermore the DBGACTL RW and RWE bits can be used to
qualify the range comparison on either a read or a write access. The corresponding DBGBCTL bits are
ignored. The SZE and SZ control bits are ignored in range mode. The comparator A TAG bit is used to tag
range comparisons. The comparator B TAG bit is ignored in range modes. In order for a range comparison
using comparators A and B, both COMPEA and COMPEB must be set; to disable range comparisons both
must be cleared. The comparator A BRK bit is used to for the AB range, the comparator B BRK bit is
ignored in range mode.
When congured for range comparisons and tagging, the ranges are accurate only to word boundaries.
6.4.2.2.1
Inside Range (CompA_Addr
≤ address ≤ CompB_Addr)
In the Inside Range comparator mode, comparator pair A and B can be congured for range comparisons.
This conguration depends upon the control register (DBGC2). The match condition requires that a valid
match for both comparators happens on the same bus cycle. A match condition on only one comparator is
not valid. An aligned word access which straddles the range boundary is valid only if the aligned address
is inside the range.
Table 6-35. NDB and MASK bit dependency
NDB
DBGADHM[n] /
DBGADLM[n]
Comment
0
Do not compare data bus bit.
0
1
Compare data bus bit. Match on equivalence.
1
0
Do not compare data bus bit.
1
Compare data bus bit. Match on difference.