![Page 1: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/1.jpg)
64x+ Advanced Emulation Techniques
and Technologies
SDO Applications
December, 2007
![Page 2: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/2.jpg)
2
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 3: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/3.jpg)
3
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 4: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/4.jpg)
4
XDS560 Trace
• What is XDS560 Trace?
– XDS560 Trace is an Emulation Technology that allows real-time,
non-intrusive logging of CPU Address Bus and Data Bus Activity in
a DSP Application
• Which 64x+ Targets is Trace Available on?
– “Full-GEM” Devices
• C6455
• C6488
• DM647
• DM648
![Page 5: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/5.jpg)
5
XDS560 Trace Architecture
Additional JTAG Emulation Pins
DATA ADDRESS BUSSES
DATA BUSSES
PROGRAM BUS
DSP
XDS560T POD
CPU
XDS560T POD RECORDING
UNIT
• Current Buffer Size: 224K
• Future: 64 MB To/from host PC
Trace & AET Jobs
Comparators
Compressor
Cycle counter
![Page 6: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/6.jpg)
6
Required Hardware and Software
• 60 Pin emulation header
• Target must support Trace (Full-Gem)
• Blackhawk USB 560
• XDS560T Trace Pod/Cable
• CCS 3.30 or higher
![Page 7: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/7.jpg)
7
0x00897C68 102458
102462102463Cycle Count 102456102457102458102459102460102461
Trace Log
PC Cycles
0x00897C64 102457
0x00897C6C 102459
0x00897C70 102460
0x00897C74 102461
0x00897C78 102462
0x00897C7C 102463
0x00897C60 102456
Trace Example (PC & Timing)
![Page 8: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/8.jpg)
8
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 9: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/9.jpg)
9
Advanced Event Triggering (AET)
• What is it?
– A hardware block on 64x+ “Full Gem” Devices use for detecting
application behavior and generating events.
• Why Discuss AET in conjunction with Trace?
– AET is always bundled with Trace. It is the logic that allows us to
smartly turn on trace to capture data that is interesting, and turn off
trace in locations where it is not interesting.
• Eliminates parsing through data that is irrelevant
• More importantly, conserves Trace Buffer for more interesting
information.
![Page 10: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/10.jpg)
10
AET Hardware Overview
![Page 11: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/11.jpg)
11
AET Job Examples
• Trace PC whenever the PC is between location A and B (PC Trace in Range)
• Trace all writes to memory location 0x12345678 (Data Trace)
• Halt whenever the application executes the instruction at location 0x801000, but only after it has executed the instruction at 0x804060 (Hardware Breakpoint qualified by a Sequencer State)
• Halt when the value 0x00001234 is written to location 0x80500000 (Halt on Data Write qualified by value)
![Page 12: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/12.jpg)
12
Triggers
• What type of events (triggers) can be generated?
– CPU Halt (with Debugger Connected)
– Interrupt
– Start/Increment Counter
– Stop/Reload Counter
– Start Trace
– Stop Trace
– Store Trace Sample
– Toggle Emu 0/1 Pin
![Page 13: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/13.jpg)
13
How much hardware is it?
• 6 Dual Range Comparators (4 PA/DA + 2 PA Only)
• 14 Trigger Builders* (General Use)
– 6 1-Wide Trigger Builders (Halt, Interrupt, Inc. Counter)
– 6 3-Wide Trigger Builders (State Machine State Change, Stop
Trace)
– 2 7-Wide Trigger Builders (Start Trace/ Capture Trace)
• 1 4 State State Machine (Can be split into 2 2-State)
• 2 32-Bit Multiple Mode Counters
* A Trigger Builder is just a lookup table which defines a
truth table for the combination of inputs. It is hardwired
to one of 4 events that it can generate.
![Page 14: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/14.jpg)
14
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 15: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/15.jpg)
15
AET Target Library
• Target Side Library allowing the user to program and
reprogram AET hardware from within their application.
• Documentation and examples Included
![Page 16: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/16.jpg)
16
AET Target Library
DISCLAIMER
AET Target Library cannot be used simultaneously with the CCS Event Analysis
Plug-in. There is no means for resource sharing
between the two. The AET hardware is owned by either the debugger or the application.
![Page 17: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/17.jpg)
17
AET Target Library Pros/Cons
• Pros
– Allows the user to dynamically
reprogram AET resources,
resulting in more advanced
scenarios
• TSK Stack Monitor
• Tracing of specific functions
based on context
– Full Symbolic support
• UBM Plug-in will fix this
– Can actually use AET resources
somewhat like an extra peripheral
– Can configure in initialization
routine
– Supports some scenarios that the
AET Plug-in does not
• Cons
– Requires Code Modification
– Consumes Application Cycles
– Consumes Application Footprint
![Page 18: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/18.jpg)
18
AET Target Library – Code Example
Halt on Write to Range
AET_jobParams params; /* Data Watchpoint Parameter Structure */
AET_jobIndex jobNumber; /* Job Number returned by AETLIB */
/* Initialize Parameter Structure */
params = AET_JOBPARAMS;
/* Set Parameters to Halt on Access to first 0x15 elements of memArray[] */
params.dataStartAddress = (Uint32) &memArray1[0];
params.dataEndAddress = (Uint32) &memArray1[0x15];
params.triggerType = AET_TRIG_HALT_CPU;
params.readWrite = AET_WATCH_WRITE;
params.refSize = AET_REF_SIZE_WORD;
/* Initialize AET */
AET_init();
/* Claim the AET resource */
if (AET_claim()!=AET_SOK)
return;
/* Setup the AET job with selected parameters */
if (AET_setupJob(AET_JOB_TRIG_ON_DATA_RANGE, ¶ms)!=AET_SOK)
return;
/* Remember the index of this job in the job table */
jobNumber = params.jobIndex;;
/* Enable AET */
if (AET_enable()!=AET_SOK)
return;
![Page 19: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/19.jpg)
19
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 20: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/20.jpg)
20
Application Analysis with XDS560 Trace
![Page 21: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/21.jpg)
21
Advantages over Traditional Methods
• Profiling on Actual Hardware
– No Modifications necessary for peripherals that aren’t simulated
– Memory/Cache effects inherently captured
– Extremely Fast, results in minutes
![Page 22: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/22.jpg)
22
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 23: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/23.jpg)
23
Interrupt Profiling Overview
• Capture Program Address
and Timestamp whenever the
PC is within the Interrupt
Vector Table
• Generate a cycle accurate
picture of when each
interrupt starts executing
Graphically display interrupt cycle
accurate interrupt servicing
frequency
![Page 24: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/24.jpg)
24
Trigger Configuration (Using UBM)*
*This Feature Added to UBM in CCS SR10
User needs only to specify the
symbol that signifies the start of
the interrupt vector table
![Page 25: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/25.jpg)
25
Data Captured
Raw Trace Data Processed Data
![Page 26: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/26.jpg)
26
Results
![Page 27: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/27.jpg)
27
Results - 2
![Page 28: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/28.jpg)
28
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 29: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/29.jpg)
29
Statistical Profiling Overview
Fxn1
Fxn2
Fxn3
Fxn4
Fxn5
Fxn6
4 4 2 5 3 3 2 2 2 3 3 6 6 4 4
• The Program Address is sampled at regular intervals
• Statistical Analysis is performed on the captured samples
• As in any statistical analysis, the determinations made on
the statistical sample can be related to the general
population
![Page 30: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/30.jpg)
30
Statistical Profiling - 2
• AET contains all of the hardware needed to capture
trace samples at a specified interval
• Interval should be carefully chose so as not to coincide
with a periodic function
• Application instrumentation can switch AET off in
locations that are not of interest
![Page 31: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/31.jpg)
31
Trigger Configuration (Using UBM)*
*This Feature Added to UBM in CCS SR9
User needs only to specify the
desired number of cycles
between samples
![Page 32: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/32.jpg)
32
Statistical Profiling - Results
• Comma Separated Value
Format
• Sorted from most intensive
functions to least
![Page 33: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/33.jpg)
33
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 34: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/34.jpg)
34
Thread Aware Profiling
GOAL
Generate a cycle accurate
execution graph of a
Thread/Task based
application
Time (cycles)
![Page 35: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/35.jpg)
35
Solution
• Instrument the task/thread switch function to write the
task/thread ID to a well known location (global variable)
– Operating systems typically provide hooks to insert functions in
this location
• Trace all of the writes to that location, and get a
timestamp with each.
![Page 36: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/36.jpg)
36
Trigger Configuration (Using UBM)*
*This Feature Added to UBM in CCS SR10
User needs only to specify the address of the thread
value write. This can be a numerical value, or a symbolic
variable name preceded by the address of operator.
Example: &TRACE_thrExecLog
![Page 37: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/37.jpg)
37
Results
![Page 38: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/38.jpg)
38
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 39: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/39.jpg)
39
Thread Aware Dynamic Call Graph
GOAL
Display a Thread Based
representation of actual
function execution in an
application
200
200
132
68
65
![Page 40: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/40.jpg)
40
Capturing the Data
• Thread/Task
– Hook function writes address of task
• Function
– Entry/Exit points instrumented with Mark 0/ Mark 1 instructions*
• Mark 0 inlined at each function entry point
• Mark 1 inlined at each function exit point
– Trace captures each of these locations with timestamp
* CGT 6.0.1 enables function hooks
![Page 41: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/41.jpg)
41
Trigger Configuration (Using UBM)*
*This Feature Added to UBM in CCS SR10
User needs only to specify the address of the thread
value write. This can be a numerical value, or a symbolic
variable name preceded by the address of operator.
Example: &TRACE_thrExecLog
Mark 0 is
assumed for
entry, Mark 1 for
exit.
![Page 42: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/42.jpg)
42
Presentation
• Graphical Displays become
impractical as the number of
functions increase
• At right is a sample call graph
displayed by the Guess
graphing package
![Page 43: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/43.jpg)
43
GPROF Like Format
• Modeled after Unix GPROF
• Each Thread separated into it’s own subsection
• Each function section contains only immediate callers and callees
![Page 44: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/44.jpg)
44
A Closer Look Primary Line -
describes the function
which the entry is
about and gives the
overall statistics for this
function
Lines for a Functions
CallersLines for a Functions
Callees
![Page 45: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/45.jpg)
45
Thread: 0x828194
_DEC_tcp2DeintUnpunctsoft3
_DEC_tcp2QuantizeSoft
_DEC_tcp2PreProc
_varianceEstim
_COM_spoolTsk
_COM_spoolPost
_DEC_tcp2EdmaIsr
_DEC_tcp2DeintUnpunctsoft3
Callers
Callees
_DEC_tcp2DeintUnpunctsoft3
Callers
_DEC_tcp2PreProc
Calls = 388/388
Exclusive Cycles = 14491050
Future Display – Tree View
![Page 46: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/46.jpg)
46
Agenda
• XDS560 Trace Overview
• Advanced Event Triggering Overview
• AET Target Lib
• Application Analysis with Trace
– Interrupt Profiling
– Statistical Profiling
– Thread Aware Profiling
– Thread Aware Dynamic Callgraph
• What’s Next ?
![Page 47: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/47.jpg)
47
What’s Coming Soon?
• Event Trace
– See where specific events (such as Cache Misses, Stalls, Etc)
occur within execution of your code
• Extended Buffer Memory
– Software update that allows the Trace Pod to use 64MB of
memory, rather than the current 224KB.
• Script access to Binary Trace Data
– Will allow faster processing of data to work with Extended Buffer
Memory
![Page 48: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/48.jpg)
Questions ???
![Page 49: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/49.jpg)
Backup Slides
![Page 50: 64x+ Advanced Emulation Techniques and Technologiesprocessors.wiki.ti.com/images/a/a7/AdvancedEmulation07.pdf · 64x+ Advanced Emulation Techniques and Technologies SDO Applications](https://reader033.vdocuments.site/reader033/viewer/2022042807/5f821672565c5c064d34add9/html5/thumbnails/50.jpg)
50
AET Example0x800080400x000080800x00010010
0x08F0347F0x00001234
Program Address
T2 Read Data
T1 Read Data
T2 Data Address
T1 Data Address
T2 Write Data
T1 Write Data
Address Bus
MultiplexerDual Range
Comparator0x10000
Address
Bus Multiplexer
Dual Range Comparator0x10020
Address Bus
MultiplexerDual Range Comparator0x10000
Address Bus
MultiplexerDual Range
Comparator0x10020
Comparator
Data Bus Multiplexer
0x00001234
Comparator0x00001234
Data Bus Multiplexer
Data
Qualifier Enable
Data
Qualifier Enable
Data Qualifier
Enable
Data Qualifier
Enable
<=
>=
<=
=
=
Start PC+Data Write + TimingTrace on write to memory location 0x10000-0x10020 with a value of 0x00001234
Start Timing Trace
Start RTDX TransmitStart DTDMA
Start PC TraceStore Timing
Stop RTDX TransmitStop DTDMA
Start Read Address TraceStore Read AddressStart RTDX Receive
Stop RTDX ReceiveStore Write Address
Start Write Address Trace
Start Read Data Trace
Store Read Data
Start Write Data TraceStore Write Data
Start PCTAG TraceStore PCTAG
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
Multiplexer
Counter 0 ZeroCounter 1 ZeroTrace Trigger
Multiplexer
State 0State 1State 2State 3
OUTPUT CONTROL = 0
7-Wide Trigger
Builder
Auxiliary Events
0
A&B
A&B
0
0
A&B
0
>=
Trigger Builder Selective ORS