5.8.1. Decompressor

This script takes the output from the EtmMonitor.v Verilog block, plus an image of the code being executed, and produces a decompressed trace. It uses a number of Perl modules (Image4b.pm, ImageAxf.pm, CF.pm, Coproc.pm, Output.pm, Trigger.pm). The command for invoking the decompression script is:

Decomp.pl [options] compressedFile imageFile

The command-line options can appear in any order. The options are:

-arch <Name>

When ARMV5T is specified, allows decompression of ARMv5T instructions.

-base <HexValue>

Allows the base of a binary image to be specified, if it is not 0x0.

-a

Indicates that data address tracing is enabled (can be used with -d).

-d

Indicates that data data tracing is enabled (can be used with -a).

-PortSize <size>

Specifies the port width setting of the trace. <size> must be either 4, 8, or 16.

-c <FileName>

Specifies an optional coprocessor map file.

-m

Specifies whether coprocessor CPRT tracing is enabled.

The hex format of the image file is the same as the format used to be read directly into verilog memories (using $readmemh). Example 5.2 shows a typical decompressor script command line.

Example 5.2. Typical decompressor script usage

Decomp.pl -PortSize 8 -arch ARMV4T -a -d -m log.etm rom.hex

The image file format supported is hex (see the hex/example1_hex fileprovided). These files can be generated using the fromelf program provided with the ARM tools, followed by the bin2hex Perl script provided. For example:

fromelf -bin -output test.bin test.elf
bin2hex test.bin test.hex
Copyright © 2000, 2001 ARM Limited. All rights reserved.ARM DDI 0158D
Non-Confidential