Analyze an Export-Function Model with Global Simulink Function
This example shows how you can analyze an export-function model
sldvexGlobalSimFcn
that consists of a global Simulink® Function to be used as an AUTOSAR server runnable.
Add the example folder to the search path.
addpath(fullfile(docroot,'toolbox','sldv','examples'));
Open the
sldvexGlobalSimFcn
model.open_system('sldvexGlobalSimFcn');
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
sldvexGlobalSimFcn_sldvScheduler.slx
is created. You can also generate a scheduler model by usingsldvextract
.The scheduler model consists of a MATLAB function block
_SldvExportFcnScheduler
and a function-call subsystem that calls the function calls periodically. This MATLAB function block is driven by inports which represent the input arguments of the Simulink Function. An additional Inport block calledFcnTriggerPort
, the value of which indicates whether to invoke a particular function in a time step.After the test generation analysis, in the Simulink Design Verifier Results Summary window, you see the results that
5/5
objectives areSatisfied
.