4.5.9. Timestamp packet

Timestamping enables correlation between multiple trace streams, and is provided by timestamp packets. See Timestamping. The timestamp packet consists of:

In PFTv1.0 timestamp values can have a maximum size of 48 bits. From PFTv1.1, timestamp values can have a maximum size of either 48 or 64 bits, as specified by bit [29] of the ETMCCER. See Configuration Code Extension Register, ETMCCER.

Figure 4.40 shows the format of the 48-bit timestamp packet.

Figure 4.40. 48-bit timestamp packet

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.


Figure 4.41 shows the format of the 48-bit timestamp packet in cycle-accurate mode.

Figure 4.41. 48-bit timestamp packet in cycle-accurate mode

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.


Figure 4.42 shows the format of the 64-bit timestamp packet.

Figure 4.42. 64-bit timestamp packet

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.


Figure 4.43 shows the format of the 64-bit timestamp packet in cycle-accurate mode.

Figure 4.43. 64-bit timestamp packet in cycle-accurate mode

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.


The fields in the timestamp packet are:

R

The R bit in the timestamp packet header is set to 1 if the clock frequency of the processor has changed since the last timestamp packet, and is 0 otherwise. The PFT protocol does not give a precise indication of when the clock speed changes.

Timestamp

The timestamp header is always followed by at least one byte of timestamp. The timestamp value is compressed, so that the PTM generates only enough bytes of timestamp to output the most significant bit that changes. This is a similar compression mechanism to that used for address values, where the value of the bits that are not output have not changed since the last time they were output.

A value of zero indicates that the timestamp is unknown. This might also indicate that the implementation does not fully support timestamping.

C

The C bit indicates if another byte of timestamp information follows this byte. If the C bit is 1 then there is another byte of timestamp information in the packet. If the C bit is 0, then this is the last byte of information in the timestamp packet.

If cycle-accurate tracing is enabled then the timestamp section of the packet is followed by at least one byte of cycle count. In PFTv1.0, the cycle count section gives the number of cycles since the last cycle count. In PFTv1.1, the cycle count is always zero, indicating zero cycles have passed between the last cycle count and the timestamp.

The cycle count value is compressed using leading zero compression. See Cycle count compression.

Encoding of the timestamp value

In PFTv1.0 the timestamp value is encoded as a Gray-coded number. From PFTv1.1, the timestamp value can be encoded as either a Gray-coded number or a natural binary number. Bit [28] of the ETMCCER specifies the encoding of the timestamp value in the timestamp packet. See Configuration Code Extension Register, ETMCCER

If the PTM outputs the timestamp values as a Gray-coded number, the number is calculated from the natural binary number using the following equation, where Gray[n] is the nth bit of the resultant Gray code, and binary[n] is the nth bit of the binary number:

      Gray[n] = binary[n] XOR binary[n+1]

The debugger generates the binary number from the traced Gray code using the following equation:

      binary[n] = XOR(Gray[N:n]).

In this equation, N+1 is the size in bits of the timestamp.

Copyright © 1999-2002, 2004-2008, 2011 ARM. All rights reserved.ARM IHI 0035B
Non-ConfidentialID060811