基于事件的调度
模型中可以包含模块,以生成处理异步事件的代码,例如以下异步事件:
硬件生成的中断
已用时间计时器
异步读写操作
实时操作系统 (RTOS) 生成的异步任务
要进行仿真,您可以将异步事件数据导入到函数调用子系统中。
模块
Asynchronous Task Specification | 指定由异步中断触发的引用模型表示的异步任务的优先级 |
Async Interrupt | 生成执行下游子系统或 Task Sync 模块的 Versa Module Eurocard (VME) 中断服务例程 (ISR) |
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 |
主题
- 异步事件
一种设计模型,支持模块的执行以响应与系统的周期计时源异步发生的事件。
- 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.
- 生成要导出到外部代码库的组件源代码
将从模型组件生成的 C/C++ 源代码与在 Simulink® 环境之外开发的代码集成在一起。
- Simulink Function Blocks and Code Generation
Generate reusable code from Simulink Function blocks.
- Asynchronous Support Limitations
Limitations of asynchronous event support.