Main Content

PIL Coverage Breakdown

Metric ID



This metric returns the coverage measured in the processor-in-the-loop (PIL) test results, aggregated across the unit. The metric result includes the percentage of coverage achieved by the PIL tests, the percentage of coverage justified in coverage filters, and the percentage of coverage missed by the PIL tests.

Computation Details

The metric:

  • Returns aggregated coverage results.

  • Does not include coverage from tests that run in simulation (model testing) or software-in-the-loop (SIL) mode.

  • Returns 100% coverage for models that do not have coverage points.


To collect data for this metric, use getMetrics with the metric ID slcomp.pil.CoverageBreakdown.

Collecting data for this metric loads the model file and test results files and requires a Simulink® Coverage™ license.


For this metric, instances of metric.Result return Value as a struct that contains fields for:

  • Statement — Aggregated statement coverage

  • Decision — Aggregated decision coverage

  • Condition — Aggregated condition coverage

  • MCDC — Aggregated modified condition/decision coverage (MC/DC)

  • Function — Aggregated function coverage

  • FunctionCall — Aggregated function call coverage

Each field contains a struct that contains these fields:

  • Achieved — Percentage of coverage achieved by PIL tests

  • Justified — Percentage of coverage justified by PIL tests

  • Missed — Percentage of coverage missed by PIL tests

  • AchievedOrJustified — Percentage of coverage completed by PIL tests. The dashboard considers coverage completed if the coverage is either achieved or justified.

Compliance Thresholds

The default compliance thresholds for this metric are:

  • Compliant — Test results return 0% missed coverage

  • Non-Compliant — Test results return missed coverage

  • Warning — None

See Also

| |

Related Topics