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.
PCD Trace
Contents
Program Counter Discontinuity (PCD) Trace[edit]
PCD Trace[edit]
Program Counter Discontinuity (PCD) Trace captures the PC discontinuities & simulator events during the application simulation.
PCD Trace Features[edit]
- PCD Trace records for branch/callp/ret instructions.
- PCD supports collection of simulator events - mainly memory architecture statistics.
cycle.Total cycle.CPU CPU.stall.mem.L1P CPU.stall.mem.L1D L1D.hit.summary L1D.miss.summary L1P.hit L1P.miss L2.cache.miss.summary L2.cache.hit.summary
Supported Configuration[edit]
- Supported on all C64x+ based single-core devices.
- C6416 Cycle Accurate Simulator
- C6416 Functional Simulator
Enable PCD Trace[edit]
PCD Trace is enabled through simulator configuration to start collection. Trace collection can be halt & resume collection during simulation through GEL commands.
Configuration File Changes[edit]
Follow the steps to enable PCD trace in simulator configuration file.
- Step 1: Open CCSetup and select the simulator.
- Step 2: Identify the simulator configuration file of the selected simulator. Check the right pane of CCSetup or click the modify properties to show the configuration file path.
- Step 3: Open the simulator configuration file & search for DSP keyword. Next to DSP key is the module name of the CPU. (Ex: DSP C64xplus;)
- Step 4: Search for END <Module name> and add the module profile given below above that line. (Ex: END C64xplus;)
MODULE PROFILE; CALL_GRAPH ON; BRANCH_TRACE_EVENTS CPU.NOP,CPU.execute_packet; // <EVENT_1>,<EVENT_2>...<EVENT_n>; END PROFILE;
Dyanmic Start/Stop[edit]
PCD Trace can be halted & resumed collection during simulation. This support is enabled via GEL command.
- Resume Trace collection - GEL_DriverString("START_PCDT")
- Halt Trace collection - GEL_DriverString("STOP_PCDT")
PCD Trace Format[edit]
PCD Trace contains.
- Source PC - PC at which the branch/callp/ret instruction.
- Destination PC - The branch target PC.
- Memory architecture statistics - Cumulative count (w.r.t last PCD) for every configured-list of memory architecture statistics.
######################################################## SOURCE_PC|DEST_PC|RPT_COUNT|CPU.NOP|CPU.execute_packet| ######################################################## 0xe0001464|0xe0001750|1|8|12| 0xe0001764|0xe00063a0|1|7|5| 0xe00063e4|0xe00010a0|1|5|10| 0xe0001154|0xe00068e0|1|14|135| 0xe00068e0|0xe0004440|1|3|3| 0xe0004448|0xe0004c00|1|5|5|
PCD Trace Usefullness[edit]
The PCD Trace can used to generate following information.
- Call Graph - The PCD can be correlated to the object file and a complete function call graph can be constructed using PCD Trace.
- Function level profiling - PCD occurring at the function boundaries can be used to visualize the function-levelprofiling data.