You copied the Doc URL to your clipboard.

2.10. Data compression

The STM supports leading-zero trace data compression. You can enable support for this functionality for each of the extended stimulus port and hardware event observation front-end input interfaces:

  • program the STMTCSR.COMPEN bit to control the compression functionality for the extended stimulus ports

  • program the STMHEMCR.COMPEN bit to control the compression functionality for the hardware event observation interface.

This compression method chooses a smaller data packet size than that specified by the stimulus if the data contains enough leading zeros. For example, if a 32-bit value of 0x0000FFFF is written to the stimulus port and compression is enabled, a D16 packet is generated rather than a D32 packet. A value of 0x00000FFF generates a D16 packet because the highest nonzero bit (11) is beyond the range of a D8 packet.

You must only enable compression for the extended stimulus ports if the size of every write to the STM is already known, for example because every write is 32 bits. This is because the original size of each STM write is not indicated in the packet when compression is enabled.

Compression can always be enabled for the hardware event observation interface without the loss of information.

Was this page helpful? Yes No