Code Coverage Support According to ISO 26262
Software quality assurance in electronic control devices, according to the ISO 26262 standard, is often a fairly difficult task in practice. Especially in real-time-critical multi-core systems, typical control-flow-oriented methods, which use compiler supported code instrumentation for coverage measurement, very quickly reach their limitations. The code coverage support implemented in UDE is a trace-based, non-intrusive method that allows to determine the statement coverage (C0 coverage) and branch coverage (C1 coverage) even with optimized code. The measurement is based on instruction trace data, which were delivered by MCDS, NEXUS, ETM and CoreSight hardware trace channels.
UDE provides different views to enable interpretation of code coverage results.
The Program Window displays per-core statement coverage information as line markers for completely covered, partially covered, and uncovered source lines and instructions.
The Code Coverage Window provides details of the coverage on 4 levels:
- core minimum-coverage
- function coverage
- source line coverage
- machine instruction coverage.
Besides the value, the results are displayed as percentage bar chart for C0 and C1 coverage.
Additional functions include
- Sorting of functions by name, start address or coverage value.
- Pre-filtering the trace for analysis of specific functions.
- Object model access for test automation.
- Accumulation of coverage data over multiple trace recordings and sessions.
- Creation of coverage reports in several formats.
To meet the requirements for evidence of the performed code coverage measurements within the entire software quality assurance process, complete reports with all details have to be created. These reports are essential for the subsequent traceability of the performed measurements and their interpretation.
The UDE Code Coverage Report contains all information needed to reproduce the coverage results:
- Used target application
- Date of measurement
- Overview about function coverage results
- Line based coverage of source files
- Address based coverage of machine instructions
- List of uncovered instructions and branches.
The reports are previewed in the Code Coverage Window after they are created.
Besides the HTML format, reports can also be generated in XML, CSV and text format. While the XML and text report contains the same information as the HTML report, the CSV report can be configured by the user to provide different levels of details, ranging from function level only to detailed machine instruction level. For multi-session coverage analysis, a storage XML-format is supported, which allows export and import of raw coverage data to/from an external file. It contains all information required to calculate and accumulate coverage data from new trace recordings. Additionally, it provides a history of all trace recordings accumulated in the data.
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.
The code coverage analysis is available via the UDE Object Model, as trace stream-based service. The interfaces provide fine grained control over each aspect of the coverage analysis, including configuration, control, access to results and creating of reports. User-controlled or automatic start of analysis or creating of reports and storage exports are provided.