| |||
| Home > Program Trace Macrocell Programmers Model > EmbeddedICE watchpoint comparator inputs > Examples of using EmbeddedICE watchpoint comparator inputs | |||
These are examples of how you could use the EmbeddedICE watchpoint comparator inputs, and how you must configure the appropriate input for each use:
To use an EmbeddedICE watchpoint comparator input to count the number of instructions executed at a particular address, the PTM must pulse the EmbeddedICE watchpoint comparator input for one cycle each time the EmbeddedICE logic matches the required address. Therefore, you must set the appropriate bit of the EmbeddedICE Behavior Control Register to 0, to indicate that the EmbeddedICE watchpoint comparator input must be pulsed.
To use an EmbeddedICE watchpoint comparator input to count the number of cycles spent in a particular range of instruction addresses, the PTM must hold the EmbeddedICE watchpoint comparator input HIGH from the first to the last clock cycle for which the EmbeddedICE logic compares an instruction address in the required range. Therefore, you must set the appropriate bit of the EmbeddedICE Behavior Control Register to 1, to indicate that the EmbeddedICE watchpoint comparator input must be latched.
To use an EmbeddedICE watchpoint comparator input to include a particular range of trace addresses using TraceEnable, the EmbeddedICE watchpoint comparator input must latch between each comparison. Therefore, you must set the appropriate bit of the EmbeddedICE Behavior Control Register to 1, to indicate that the EmbeddedICE watchpoint comparator input must be latched.
For details of configuring the EmbeddedICE Behavior Control Register, see EmbeddedICE Behavior Control Register, ETMEIBCR.