NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

EP Trace

From Texas Instruments Wiki
Jump to: navigation, search

EP Trace[edit]

The main purpose of EP trace is to capture the execute packet sizes as they are fetched and executed from memory, the number of CPU cycles they consume in execution and discontinuity in PCs.
Specifically with regard to SPLOOP construct on C64+ ISA, the purpose is also to capture the cycles spent by executing from memory and the overall cycles spent in executing completely from loop buffer ( with no instruction executed from memory fetch).

EP Trace Features[edit]

  • In the C64x and C64x+ ISA, all instructions executing in parallel constitute an execute packet. An execute packet can contain up to eight instructions. Each instruction in an execute packet must use a different functional unit.
  • The EP trace (in the simulator) captures all the execute packet in a given program run
  • Each EP record is dumped into a binary trace file and the output file is named as "<executable filename>.ept" & created at same location as executable file.
  • The binary trace file contains a series of EP records. The records will be one of the following types.
    • Info record- captures the CPU cycle and PC value. Info records are dumped whenever a StartEPTrace or a StopEPTrace is performed through GEL, mainly to capture the start and stop points in trace.Fields of interest in an info record are only the CPU cycle and PC value. The other fields can be neglected. 
    • Normal record - captures the EP size in bytes and the latency of the EP.
    • Discontinuity record - captures the discontinuity address, the size and latency of the EP causing discontinuity. <address>:<EP size>:<latency>. In case of interrupt discontinuity, the EP size will be 0.
    • SPLOOP record - captures the EP trace for SPLOOP executions. Sploop record can be of two types.
      • Memory execution record - captures EPs that are fetched from memory and executed. This will include parts of prologue and epilogue records that are fetched from memory and not from loop buffer. This record captures EP size and latency. <EP size>:<latency>.
      • Loop buffer execution record - corresponds to 100% execution from loop buffer. This record is dumped to capture the cycles spent in executions completely out of loop buffer. Memory fetch is disabled for the duration of the cycles captured in this record. <Cycles>
      • Sploop memory discontinuity record - corresponds to EP taking a discontinuity in sploop epilogue. Typically this record will show up for sploop with reload case, having an outer loop branch instruction. 
    • The EP trace uses CPU cycles as time stamp.
    • Note: To co-relate EP trace with a PDATS trace, it is necessary to generate the PDATS trace with timestamp being CPU cycles *only* (__TIMESTAMP_WITH_MEMSTALLS OFF;__)

Supported Configurations[edit]

  • Supported on all C64x+ based single-core devices.
  • C6416 Cycle Accurate Simulator
  • C6416 Functional Simulator
  • C6670/C6678 Device functional/CX simulators


Enable EP Trace[edit]

EP trace collection is enable through GEL commands.

  • To start EP trace collection - GEL_DriverString("START_EP_TRACE")
  • To stop EP trace collection - GEL_DriverString("STOP_EP_TRACE")

On Code Composer Studio V4 (CCSv4), the GEL_DriverString commands could be provided to the simualtor through the scripting console(View->scripting console). In the console window, enter eval("GEL_DriverString(\"START_EP_TRACE\")") to feed in ep trace start command for eg..


Note: Dynamic start/stop of trace collection is possible during the simulation.

EP Trace to Text Converter[edit]

EP Trace is a binary trace, so we provide a binary to text converter "ep_trace_util.exe"

EP trace version/description CCS version Supported platforms/compilers Download
version2,3 CCS4.x, CCS5.0.x, Link
version 4 / total cycles field added in trace CCS5.1

Windows - VC6.0, VC8.0

Linux - gcc3.4, gcc4.0

Link

Dependency on few headers from boost library. Download version 1.37 from www.boost.org if interested in building the package.

 

Usage[edit]

The EP trace is a binary format and hence need a script to convert it to the textual format. The ep_trace_util.exe utility available within the zip file at "format_ept\exe\pc\release"

Usage : ep_trace_util.exe -2txt <filename>.ept <filename>.txt
                 or
Usage : ep_trace_util.exe -2bin <filename>.txt <filename>.ept

Output File Format[edit]

The output text file is a user readable ASCII format. The listing below shows a sample output.

###############################################################################################
#### Absolute CPU Cycle: PC : Record Type : EP cycles : Address : EP Size : CPU Stall Cycle####
###############################################################################################
####Version:3
531:0xe0001440:0:0:0xe0001440:110:0
531:0xe0001440:2:1:0xe0001440:4:0
532:0xe0001444:2:1:0xe0001440:4:0
533:0xe0001448:2:2:0xe0001440:2:0
535:0xe000144a:2:1:0xe0001440:2:0
536:0xe000144c:2:1:0xe0001440:2:0
537:0xe000144e:2:2:0xe0001440:2:0

The first line of the file is the header. This specifies the format in which the trace record is stored. Each record is stored in the following format: <CPU Cycles>:<PC address>:<EP cycles>:<EP Size>:<CPU Stall cycles>

  • CPU Cycles - CPU Cycle at which the EP was recorded
  • Record Type - EP record type - Info(0),  Discontinuity(1), Normal(2), Sploop memory(3), Sploop buffer(4), sploop memory discontinuity(5) 
  • PC Address - PC Address, start address of the EP 
  • EP Cycles - This field captures the overall latency of the execute packet. It is the max of individual latencies of the instructions constituting the EP. This includes CPU stall cycles, if any. 
  • EP Size - Overall size of the EP in number of bytes
  • CPU Stall Cycles - Number of CPU stall cycles.
    • For C6000 simulators, this field includes only the cross path stall cycle.

Multi core support[edit]

To generate EP trace files on multiple cores, ensure that the .out loaded on different cores are named differently. This will enable EP trace to generate unique .ept files for each core.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article EP Trace here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article EP Trace here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article EP Trace here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article EP Trace here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article EP Trace here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article EP Trace here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article EP Trace here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article EP Trace here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article EP Trace here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity