Once you are ready to generate production code, use configuration options and advanced optimizations to improve performance. These options reduce RAM and ROM consumption and speed up code execution. If you want more defensive code at the expense of some efficiency, you can disable one or more of these options.
Use code execution profiling to:
Establish whether the generated code meets real-time requirements of your target hardware.
Determine code sections that require performance improvements.
You can configure software-in-the-loop (SIL) and processor-in-the-loop (PIL) simulations to produce execution time profiles for your generated code.
You can run a model’s current configuration against one or more of the objectives available in the Code Generation Advisor. Based on your objective selections and prioritizations, the Code Generation Advisor offers changes that you can make to your model’s configuration settings.
- Code Execution Profiling
View and analyze execution profiles of code sections
- Defensive Programming
Make tradeoffs between defensive and efficient code
- Data Copy Reduction
Adjust model parameters to improve code execution speed and reduce memory usage
- Execution Speed
Improve execution speed of generated code
- Memory Usage
Reduce RAM, ROM, and stack space used by generated code
- Code Replacement Customization
Create and maintain code replacement libraries