2.2.3. Derived resources

There are three types of derived resource. These are resources that are not directly related to memory accesses, and are:

There are between zero and four counters, and there is zero or one sequencer.

The trace start/stop resource is always present in ETMv1.2, and is optional in ETMv2.0 and later.

Counters

Each counter is clocked by the system clock, even on cycles when the processor is stalled. The counter decrements when its counter enable is active. Operation of the counter is controlled by a count enable event. You configure the counter to decrement, at full system clock speed, by setting the count enable event to TRUE.

The counters are 16-bit, so they can count from 1 to 65535 events.

Each counter has a programmable reload register. You can define an event that causes the counter to be reloaded from this register. This reload event takes priority over the count enable event.

When the counter reaches zero it remains at zero and the resource becomes active. It remains active until the counter is reloaded.

You can read and write the counter values using registers. See About the counter registers and ETM Programming bit and associated state.

In ETMv3.5, the ETM supports one counter having a reduced function. This counter decrements every cycle and always reloads when it reaches zero. See Reduced function counter, ETMv3.5.

Sequencer

An ETM provides a three-state sequencer. If you require multiple-stage trigger schemes, the trigger event is usually based on a sequencer state. If you want the trigger to be derived from a single event, you do not require the sequencer.

Figure 2.1 shows the sequencer state diagram. The sequencer has three possible next states (the current state and two others), and can change state on every clock cycle. The state transitions are controlled with events. For more information see ETM event logic.

On every cycle the sequencer does one of the following:

  • remains in the current state

  • moves to one of the other two states.

Figure 2.1. Sequencer state diagram

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


On an ETM reset, the sequencer goes to State 1. See Reset behavior.

Whatever the current state of the sequencer, there are two state transition events that change its state, and:

  • if both of these state transition events are active the sequencer remains in its current state

  • if neither of these state transition events is active the sequencer remains in its current state

  • the behavior of the sequencer is unpredictable if either of these state transition events has not been programmed.

You can read and write the current state of the sequencer. See About the sequencer registers and ETM Programming bit and associated state.

Trace start/stop resource

In ETMv2.0 and later, the trace start/stop resource is available and gives the current state of the trace start/stop block that is used in the generation of the TraceEnable filtering signal. This resource can be used even if it is not in use by TraceEnable. For more information see The trace start/stop block.

For more information about TraceEnable, see Trace filtering.

Before ETMv2.0, the trace stop/start block is available only for use by TraceEnable.

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