Main Content

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.

  1. Add the example folder to the search path.

    addpath(fullfile(docroot,'toolbox','sldv','examples'));
  2. Open the sldvexGlobalSimFcn model.

    open_system('sldvexGlobalSimFcn');
  3. 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 using sldvextract.

    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 called FcnTriggerPort, the value of which indicates whether to invoke a particular function in a time step.

  4. After the test generation analysis, in the Simulink Design Verifier Results Summary window, you see the results that 5/5 objectives are Satisfied.

Related Topics