5.2.2. Calculating the number of trace port pins

The number of trace port pins that your system requires depends on:

Bandwidth required by ETMs

The bandwidth that ETMs require depends on the clock speed of the processor and the average number of instructions that your application executes per cycle. It is recommended that, to estimate your requirements, you trace the software that you intend to trace in your SoC in a development environment. Contact ARM for more information about the bandwidth that ETMs require to trace popular benchmarks.

The bandwidth the ETM trace requires is greatly affected by enabling:

  • cycle-accurate tracing

  • data address tracing

  • data value tracing.

Table 5.1 shows the typical difference in trace bandwidth between these levels of trace. You must calculate the average number of instructions per data transfer and the number of instructions per processor cycle for your application to determine the trace bandwidth you require.

Table 5.1. Effect of different tracing levels on ETM bandwidth requirements

Data trace levelCycle-accurate mode

Average bits per instruction

Average bits per data transfer
Instruction plus dataNo440
Instruction onlyNo1.2N/A
Instruction plus dataYes840
Instruction onlyYes6N/A

You can support one level of tracing when an ETM is the only trace source using the trace port, and a lower level of tracing when other trace sources share the trace port. For example, you can provide sufficient trace bandwidth so that:

  • an ETM can perform full data tracing when it is the only trace source enabled

  • the same ETM can only reliably perform instruction tracing when combined with other trace sources.

Overhead of formatter protocol

The TPIU, ETB, ETR and ETF implement a formatter protocol to enable multiple trace protocols to share the same trace port. The formatter protocol wraps the trace protocols from the trace sources in the system, and adds Trigger and Trace Disabled information. For a description of this, see Operation of a TCD. The trigger information indicates when the TPIU or ETB received a trigger, and is sometimes useful when analyzing the trace.

You can configure the ETB to bypass the formatter if both the following conditions apply:

  • only one trace source is enabled

  • you do not have to record when in the trace the ETB received a trigger.

You can configure the TPIU to bypass the formatter if all of the following conditions apply:

  • only one trace source is enabled

  • you do not have to record when in the trace the TPIU received a trigger

  • your system implements the TRACECTL trace port pin

  • the TPA is able to understand the information on TRACECTL.

You can program the ETB, ETR and ETF configurations of the TMC to bypass the formatter if the following conditions apply:

  • only one trace source is enabled

  • you do not have to record when a trigger is received

  • circular buffer mode is selected

  • in ETF configuration only, the buffer drain mode is not enabled.

The formatter adds:

  • A fixed overhead of 6% to the trace bandwidth.

  • An overhead of one byte every time the trace bus switches between trace sources. To minimize the switching cost configure the trace funnels appropriately. For more information on this, see Arbitration.

Copyright © 2004, 2007, 2010 ARM Limited. All rights reserved.ARM DGI 0012D
Non-ConfidentialID062610