Analyze Export-Function Model with Function-Call Subsystems
This example shows how you can analyze a model which consists of periodic function-call subsystems. This example uses the AUTOSAR example model
1. Open the
2. To run the test generation analysis, on the Design Verifier tab, click Generate Tests.
The Simulink Design Verifier Results Summary window indicates that a scheduler model
sldvExportFunction_autosar_multirunnables_SldvScheduler.slx is created. You can also generate a scheduler model by using
The scheduler model consists of a MATLAB® function block
_SldvExportFcnScheduler. The function calls are called periodically as the model consists of periodic function-call subsystem.
The MATLAB® code specifies the order in which the periodic function-call execute.
Runnable2 executes first because the time period is
1 for both of them. After
10 time steps,
If the model consists of aperiodic function-call subsystems, the scheduler consists of an additional inport
FcnTriggerPort. The value of
FcnTriggerPort indicates whether to invoke the function-call in a time step.
For example, if
Runnable1 is an aperiodic function-call subsystem, the
FcnTriggerPort Inport block invokes the scheduler model. This graphic shows the Timing Legend window and the scheduler model for an aperiodic function-call.
After the test generation analysis, in the Simulink Design Verifier Results Summary window, you see the results that
7/7 objectives are
3. To simulate the test cases and generate a coverage report, click Simulate tests and produce a model coverage report in the Simulink Design Verifier Results Summary window. The software simulates the test cases, collects model coverage information, and displays a coverage report.
4. To view the detailed analysis report, click HTML in the Simulink Design Verifier Results Summary window.
The Schedule for Export Function Analysis section in the Analysis Information chapter lists the schedule for invoking the export functions.