Real-Time Workshop® 7.1
Product Description
- Introduction and Key Features
- Working with Real-Time Workshop
- Selecting Targets
- Defining and Controlling Data
- Executing Code in a Real-Time Environment and Optimizing Code
- Customizing Real-Time Workshop
Executing Code in a Real-Time Environment
Real-Time Workshop provides a complete framework for executing the generated code in real time and incorporating it into your execution environment. It generates single-rate or multirate code based on the periodic sample times specified in the model. Code is deployed with or without an RTOS, and in single-tasking, multitasking, or asynchronous mode.
Single-Tasking
In single-tasking mode, a simple scheduler invokes the generated code as a single thread of execution, preventing preemption between rates.
Multitasking
In multitasking mode, a deterministic rate monotonic scheduler invokes the generated code, enabling preemption between rates. In a bare-board environment, you preempt the code with nested interrupts. In an RTOS environment, you use task priorities and task preemption.
Asynchronous
In asynchronous mode, nonperiodic or asynchronous rates are specified using Simulink S-functions. Real-Time Workshop translates these rates into target-specific code based on your execution environment. You model and generate code for events, such as hardware interrupts, and trigger subsystems as independent tasks. An asynchronous block library is provided for the VxWorks RTOS that you can use as a template for creating a library appropriate for your own environment.
Real-Time Deployment
Simulink and Real-Time Workshop provide a complete set of target-independent capabilities for real-time deployment. These include:
- The ability to specify priorities for each rate in your model
- Production-quality counters and timers for computing absolute and elapsed time
- A Rate Transition Block to specify data transfer mechanisms between rates (for example, semaphore, mutex, and double buffering) to trade off data integrity, determinism, and performance
- Overrun detection for incorporating error-handling logic for each rate
Optimizing Code
Real-Time Workshop provides user-selectable code optimizations to improve code efficiency. These include:
- Code reuse
- Expression folding
- Signal storage reuse
- Dead path elimination
- Parameter inlining
- Single-precision and prebuilt target function libraries (including ISO C and GNU C)
Store
