5.4.2 DEM trace capabilities

To improve at-speed trace, the DEM converts the incoming DTB into an external interface, STMHWEVENT. This interface runs directly in the Hardware Event Observability Interface (HEOI) of a CoreSight System Trace Macrocell (STM).

The DEM performs a 4:1 expansion of the DTB onto the STMHWEVENT interface, converting the 8-bit DTB into a 32-bit STMHWEVENT interface. This expansion is required for the following reasons:

The DTB is converted to STMHWEVENT with each DTB bit creating four adjacent STMHWEVENT bits as follows:

Therefore, groups of four STMHWEVENT bits correspond to a single DTB bit as follows:

If you do not want to run the external STM hardware at a strict 2:1 frequency division of the CCN-502 input clock, the DEM includes a DCLKEN input pin that is functionally identical to the ACLKEN* clock enable input used on the CCN-502 AMBA interfaces. This creates a synchronous clock that can run at 2:1, 3:1, or 4:1 to the CCN-502 input clock, GCLK0.

You cannot use DCLKEN to create a 1:1 frequency clock control. STMHWEVENT must always operate at 2:1 or lower to the CCN-502 clock frequency. However, for any frequencies below 2:1, multiple DTB events might be received in any given DCLKEN clock cycle. In this case, it is impossible to retain the uniqueness of these multiple events, and instead events are sticky in a given DCLKEN cycle in the conversion from DTB to STMHWEVENT. This is known as event collapsing, and means that any DTB event that occurs is guaranteed to be seen on the STMHWEVENT interface after the subsequent DCLKEN assertion, but the precise timing and uniqueness of that event is not guaranteed except in the case of 2:1 DCLKEN.

Although the STMHWEVENT interface is useful even when event collapsing occurs and without totally accurate globally-timed event tracing, you must be aware of the limitations of trace capabilities in such a configuration.

The STMHWEVENT outputs for a given DTB bit are produced as a shift register. The DTB bits are shifted into staging flops each cycle, then moved to the output flops on a DCLKEN pulse. Event collapsing is used for the oldest events, because the oldest staging flop includes an OR function at the input. The following tables show this behavior.

Table 5-2 2:1 DTB-to-STMHWEVENT conversion

Cycle DTB[0] DCLKEN Staging STMHWEVENT
[0] [1] [2] [3] [0] [1] [2] [3]
i C 1 -a A B C 0 0 0 0
i+1 D 0 A B C D 0 0 0 0
i+2 E 1 0 0 0 E A B C D
i+3 F 0 0 0 E F A B C D
i+4 G 1 0 E F G 0 0 0 0
i+5 H 0 E F G H 0 0 0 0
i+6 I 1 0 0 0 I E F G H
i+7 J 0 0 0 I J E F G H
i+8 K 1 0 I J K 0 0 0 0
i+9 L 0 I J K L 0 0 0 0
i+10 M 1 0 0 0 M I J K L
i+11 N 0 0 0 M N I J K L
i+12 O 1 0 M N O 0 0 0 0
i+13 P 0 M N O P 0 0 0 0

Table 5-3 3:1 DTB-to-STMHWEVENT conversion

Cycle DTB[0] DCLKEN Staging STMHWEVENT
[0] [1] [2] [3] [0] [1] [2] [3]
i D 0 A B C D 0 0 0 0
i+1 E 1 A|B C D E 0 0 0 0
i+2 F 0 A|B|C D E F 0 0 0 0
i+3 G 0 0 0 0 G A|B|C D E F
i+4 H 1 0 0 G H A|B|C D E F
i+5 I 0 0 G H I A|B|C D E F
i+6 J 0 G H I J 0 0 0 0
i+7 K 1 G|H I J K 0 0 0 0
i+8 L 0 G|H|I J K L 0 0 0 0
i+9 M 0 0 0 0 M G|H|I J K L
i+10 N 1 0 0 M N G|H|I J K L
i+11 O 0 0 M N O G|H|I J K L
i+12 P 0 M N O P 0 0 0 0
i+13 Q 1 M|N O P Q 0 0 0 0
i+14 R 0 M|N|O P Q R 0 0 0 0
i+15 S 0 0 0 0 S M|N|O P Q R
i+16 T 1 0 0 S T M|N|O P Q R
i+17 U 0 0 S T U M|N|O P Q R

Table 5-4 4:1 DTB-to-STMHWEVENT conversion

Cycle DTB[0] DCLKEN Staging STMHWEVENT
[0] [1] [2] [3] [0] [1] [2] [3]
i E 0 A|B C D E 0 0 0 0
i+1 F 0 A|B|C D E F 0 0 0 0
i+2 G 1 A|B|C|D E F G 0 0 0 0
i+3 H 0 A|B|C|D|E F G H 0 0 0 0
i+4 I 0 0 0 0 I A|B|C|D|E F G H
i+5 J 0 0 0 I J A|B|C|D|E F G H
i+6 K 1 0 I J K A|B|C|D|E F G H
i+7 L 0 I J K L A|B|C|D|E F G H
i+8 M 0 I|J K L M 0 0 0 0
i+9 N 0 I|J|K L M N 0 0 0 0
i+10 O 1 I|J|K|L M N O 0 0 0 0
i+11 P 0 I|J|K|L|M N O P 0 0 0 0
i+12 Q 0 0 0 0 Q I|J|K|L|M N O P
i+13 R 0 0 0 Q R I|J|K|L|M N O P
i+14 S 1 0 Q R S I|J|K|L|M N O P
i+15 T 0 Q R S T I|J|K|L|M N O P
i+16 U 0 Q|R S T U 0 0 0 0
i+17 V 0 Q|R|S T U V 0 0 0 0
i+18 W 1 Q|R|S|T U V W 0 0 0 0
i+19 X 0 Q|R|S|T|U V W X 0 0 0 0
i+20 Y 0 0 0 0 Y Q|R|S|T|U V W X
i+21 Z 0 0 0 Y Z Q|R|S|T|U V W X
i+22 A 1 0 Y Z A Q|R|S|T|U V W X
i+23 B 0 Y Z A B Q|R|S|T|U V W X

The trace capability is a conversion of the DTB, so you can trace CCN-502 performance monitoring events rather than debug events, because the PMU events are sent over the DTB to the DEM.

a The data is not valid.
Non-ConfidentialPDF file icon PDF versionARM 100052_0001_00_en
Copyright © 2014, 2015, 2017 ARM Limited or its affiliates. All rights reserved.