Real-Time Workshop    

Conditional Branch Execution

Conditional input branch execution is a Simulation and code generation optimization technique that improves model execution when the model contains Switch and Multiport Switch blocks. By default, the Real-Time Workshop code generation options are configured to use the conditional input branch optimization.

When Conditional input branch optimization is on, instead of executing all blocks driving the Switch block input ports at each time step, only the blocks required to compute the control input and the data input selected by the control input are executed.

You can turn conditional input branch optimization on or off by selecting the Conditional input branch option on the Advanced pane of the Simulation Parameters dialog box.

For a example of conditional input branch optimization demo, use this link to the condinputexec demo, or type the following command at the MATLAB prompt.


  Utilizing Expression Folding in Your TLC Block Implementation Block Diagram Performance Tuning