Main Content

Add Top-Level Asynchronous Trigger to Periodic Rate-Based System

In Simulink®, you can model an AUTOSAR software component in which an asynchronous function-call runnable interacts with periodic rate-based runnables. This type of component uses both periodic and asynchronous rates (sample times).

The approach can be used to model the JMAAB complex control model type beta (β) architecture. This architecture is described in the document Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow , which is available from the MathWorks® website at

In JMAAB type beta modeling, at the top level of a control model, you place function layers above scheduling layers. For example, here is an AUTOSAR example model, autosar_swc_fcncalls. In this model, an asynchronous function-call runnable at the top level of the model interacts with a periodic rate-based runnable.

Some guidelines apply to AUTOSAR modeling of the JMAAB type beta controller layout:

  • IRVs must be modeled with Rate Transition blocks.

  • Function-call subsystems must have asynchronous rates. (In the function-call subsystem Trigger block, Sample time type must be triggered, not periodic.)

  • For each asynchronous function-call subsystem, you must insert an Asynchronous Task Specification task block between the function-call root inport and the subsystem.

Here is the AUTOSAR Dictionary view of the runnables. An event triggers the asynchronous function-call runnable. The event must be of type DataReceivedEvent, DataReceiveErrorEvent, ModeSwitchEvent, InitEvent, or ExternalTriggerOccurredEvent.

In this example, an ExternalTriggerOccurredEvent activates the AUTOSAR runnable. A trigger interface delivers the event to a trigger receiver port. For more information about ExternalTriggerOccurredEvents, see Configure Receiver for AUTOSAR External Trigger Event Communication.

Here is the Code Mappings editor view of the Simulink entry-point functions. The functions are mapped to AUTOSAR function-trigger, initialization, and periodic runnables, respectively.

See Also

| (Simulink Coder)

Related Examples

More About