| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop Embedded Coder |
| Contents | Index |
| Learn more about Real-Time Workshop Embedded Coder |
When you use buses in a model for which you intend to generate code:
Setting appropriate diagnostic configuration parameters can add to the ease of development.
The bus implementation techniques used can affect the speed, size, and clarity of that code.
Some bus implementation techniques that can be useful are not immediately obvious.
This chapter contains guidelines that you can use to improve the results when you work with buses. The guidelines describe techniques for:
Simplifying the layout of the model
Increasing the efficiency of generated code
Defining data structures for function/subsystem interfaces
Defining data structures that match existing data structures in external C code
Some tradeoffs inevitably exist among speed, size, and clarity. For example, the code for nonvirtual buses is easier to read because the buses appear in the code as structures, but the code for virtual buses is faster because virtual buses do not require copying signal data. The applicability of some guidelines can therefore depend on where you are in the application development process.
This chapter focuses on optimizations that are appropriate for final production code. Before you read this chapter, be sure that you have read Using Composite Signals. This chapter assumes that you understand all the concepts and procedures described in that one, including the blocks used for creating and manipulating buses.
![]() | Optimizing Buses for Code Generation | Setting Bus Diagnostics | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |