Event-Based Scheduling
Models can include blocks for generating code that handles asynchronous events, such as:
Hardware-generated interrupts
Elapsed timers
Asynchronous read and write operations
Asynchronous tasks spawned by a real-time operating system (RTOS)
For simulation, you can import asynchronous event data into a function-call subsystem.
Blocks
Asynchronous Task Specification | Specify priority of asynchronous task represented by referenced model triggered by asynchronous interrupt |
Async Interrupt | Generate Versa Module Eurocard (VME) interrupt service routines (ISRs) that execute downstream subsystems or Task Sync blocks |
Idle Task | Create free-running task |
Task Sync | Run code of downstream function-call subsystem or Stateflow chart by spawning an example RTOS (VxWorks) task |
Topics
- Asynchronous Events
Design models that support execution of blocks in response to events that occur asynchronously to the periodic timing source of the system.
- Rate Transitions and Asynchronous Blocks
Use Rate Transition blocks to handle data transfers to and from asynchronous blocks.
- Generate Interrupt Service Routines
Generate an interrupt service routine (ISR) that is associated with a specific VME interrupt level.
- Pass Asynchronous Events in RTOS as Input to a Referenced Model
Generate code for a model that triggers asynchronous events that get passed as input to a referenced model.
- Timers in Asynchronous Tasks
Maintain absolute and elapsed timing data for blocks that execute in the context of an asynchronous task with the code generator.
- Create a Customized Asynchronous Library
Create custom blocks that support handling of asynchronous events with vxlib1 library blocks as templates.
- Import Asynchronous Event Data for Simulation
Import asynchronous event data into a function-call subsystem.
- Generate Component Source Code for Export to External Code Base
Integrate C/C++ source code, which you generate from a model component, with code developed outside the Simulink® environment.
- Simulink Function Blocks and Code Generation
Generate reusable code from Simulink Function blocks.
- Asynchronous Support Limitations
Limitations of asynchronous event support.