System level analysis with Universal Debug Engine

The knowledge of CPU load distribution of the running target application is a basic requirement to optimize their real-time behavior. The analyzing functions support the viewing, profiling and detecting of the recorded data and is realized by different views of Universal Debug Engine to display the results of recorded IP trace and data trace from different sources: MCDS, NEXUS, ETM and CoreSight code trace are supported in detail. Further the "IP-Snooping" trace method of instruction pointer of AURIX, TriCore, XC166, XE166/XC2000 and Cortex-M, Cortex-R, Cortex-A CPU periodically with minimum poll period of 1 millisecond is used to preprocess profiling data.

The trace data will be collected according to their occurrence in functions of the application. If the address value cannot be assigned to any known function, it will be assigned to known code sections of the program (depending on debug information). The evaluation counts the hits of appropriate ranges and calculates the execution time of the ranges via the execution time of the trace samples. Special hardware trace modes, which enables to save trace memory space and provide more precise details, like MCDS compact function trace, are also supported by UDE profiling.

The results are available as chart diagram and as numeric result table. The results can be saved in a free selectable XML base data sink for later processing using the UDE Profiling page. This data sink can be processed in a normal MS Excel environment or can be processed by Windows Script languages and MS XML parser function (which are installed by UDE). All functions to access to the generated profiling data are also available via the UDE object model to allow creation of internal and external scripts for automatic post-processing.

The sophisticated trace configuration management simplifies the collection of trace data for Code Coverage processing. Based on the Universal Emulation Configurator technology a management front-end enhances the generation of trace configuration, which collects the data of specific code ranges for later proof of Code Coverage. A special approach helps to analyze the debug information from the program file to reconstruct the program control flow for all supported methods of Code Coverage analysis. These trace data collection tasks can be used with trace solutions for on-chip trace, external collection of trace data by via Aurora trace interface and up to 4 GB of external trace memory or by execution of test cases via simulator.

Profiling Code coverage Execution sequence Variable access
Measurement Amount of execution time for each function Execution of code Call hierarchy and execution time sequence Memory changes
Requirements Code trace with tick information (Subroutine only possible) Code trace without tick information Code trace with tick information Data trace with tick information
Results Graphical chart and reports Graphical chart and reports Graphical chart Graphical chart

Instruction pointer trace profiling is a feature of "Universal Access Device 2" and "Universal Access Device 3" families to sample the actual content of the instruction pointer periodically during running target program.

Trace profiling is a feature of using continuous code to get an overview about the program flow distribution over the recorded code trace stream. The usage of trace profiling requires to configure the appropriate hardware trace channel (MCDS trace for Infineon TriCore architecture, NEXUS trace for NXP or STMicroelectronics Automotive Power Architecture (e200) families, ETM trace for Arm7 and Arm9 architecture, CoreSight trace for Arm11 and Arm Cortex architectures) to record the continuous code trace from whole running program or from a part of the program.

The trace profiling window displays code profiling information as result of processing code trace data to get from running target program via MCDS, NEXUS, ETM or CoreSight trace channel.

The trace code coverage summary chart page contains a bar chart, which displays the code coverage results of all functions, which were hit by the code trace address data.

  • Summary chart of the results of coverage of all recorded ranges
  • Selecting of ranges and zooming into single code lines
  • Displaying and navigating to all uncovered source line ranges instructions
  • Re-sorting the chart.

The Trace code coverage chart page for a code range (typically a function) contains a bar chart, which displays the code coverage results of all source lines, which belongs to this range.

The Execution Sequence diagram can display the interaction of executed code functions over a timeline. Two display modes are possible:

  • Instruction pointer mode
  • Function trace mode.

The graphical display window can display target data as plotted data value curves in three modes. The curve draws each series as connected points of computed target data, calculated by an user defined expression.

The graphical display window provides these three modes to display target data:

  • Scientific array chart, which enables the display of a collection or array of data based on an variable index (typically graphical display of target program data arrays). The expression can evaluate series of target data from a simple or complex target program array variable (e.g. sin[$u] or sourcedata[$i].realvalue). Multiple curve can be displayed, each with own x- and y-axis.
  • Scientific time traced signal chart, which enables to trace single variables or expressions calculated from multiple variables over the time by polling target data periodically during running target program.
  • Hardware trace (MCDS, NEXUS, ETM) signal chart, which enables display of records trace code trace samples. The display of these trace records is time based und can be switched between display of recorded trace samples according to their code addresses of for more overview according their function bodies.

The results of the profiling and coverage can be exported as XML file. The XML storage files consist of a common UDE XML export file header and one or more code coverage specific data sets:

  • Collection of all coverage ranges (functions) of the data set
  • Coverage of the range in percent, Coverage of each source line in percent
  • All instruction, which are not covered by the previous trace and which are not part of a source line range.

Furthermore Print and Chart image export functions are supported.