Stateflow® Coder™ 7.1
Product Description
- Introduction and Key Features
- Code Optimizations
Code Optimizations
Stateflow Coder supports the following code optimizations to ensure efficient C code:
- Bitset option to reduce memory requirements
- Typed data objects to ensure efficient code generation
- Full code reuse support
- Inlining of all Stateflow functions and Simulink function-call subsystems for faster execution
- Elimination of code from unreachable portions of the Stateflow chart ("dead code")
- Elimination of goto statements from Stateflow generated code using an optimized implementation
- Use of single-precision and prebuilt target function libraries (including ISO C and GNU C)
Integration with Real-Time Workshop
Stateflow Coder is tightly integrated with Real-Time Workshop, providing a unified scheme for file packaging, code reuse, customized identifier naming, and model reference. Code optimizations can be global, spanning Simulink blocks and Stateflow charts.
Code Traceability
Stateflow Coder generates highly readable code that can be easily traced back to the Stateflow chart. User comments and object descriptions are propagated into the generated code.
An identifier naming scheme that is unified with Real-Time Workshop guarantees unique identifiers that preserve the object names from the Stateflow chart. These features make it easy to conduct code reviews.
| Efficient, readable code generated by Stateflow Coder for a Stateflow chart that contains nested if statements and a while loop. Click on image to see enlarged view. |
Store
