During a top-model or Model block SIL or PIL simulation, you can collect code coverage metrics for generated code using a third-party tool. Embedded Coder® supports the following tools:
LDRA Testbed® from LDRA Software Technology. For information about installing and using this tool, go to www.ldra.com.
The software supports LDRA Testbed code coverage for SIL and PIL.
BullseyeCoverage from Bullseye Testing Technology. For information about installing and using this tool, go to www.bullseye.com.
The software supports BullseyeCoverage code coverage for SIL and, in certain cases, PIL.
To configure a code coverage tool for a top-model or Model block SIL or PIL simulation, in the Configuration Parameters dialog box, select the Verification pane:
From the Third-party tool drop-down list, select a
tool, for example,
Click Configure to open the Code Coverage Settings dialog box.
In the Installation folder field, specify the location where your coverage tool is installed. If you click Browse, the Select Installation Folder dialog box opens, which allows you to navigate to the folder where your coverage tool is installed. The software detects and displays the tool version.
By default, the following parameters are enabled:
Code coverage for this model — Generate coverage data for the current (top) model.
Code coverage for referenced models — Generate data for models referenced by the current (top) model.
If your top model has Model blocks, these parameters of the top model override the corresponding parameters of referenced models.
Click OK. You return to Verification settings.
To view cumulative code coverage results within a code generation report, in the Report pane of the Configuration Parameters dialog box, select these check boxes:
Create code generation report
Open report automatically
With LDRA Testbed:
The evaluation of cumulative code coverage begins from the point when you last added a new file to the existing set of source files. For example, existing code coverage results are deleted when you:
Run a simulation with a new model using the existing code generation folder.
Run a simulation that results in additional source code files being instrumented.
If you switch between SIL and PIL simulations of a model, the software generates separate cumulative code coverage results for the SIL and PIL simulations.
For a model in a reference hierarchy, the software does not support simultaneous function execution time measurement and code coverage.