| Simulink® Verification and Validation™ | ![]() |
MathWorks Automotive Advisory Board (MAAB) checks facilitate designing and troubleshooting models from which code is generated for automotive applications.
Consulting Model Advisor in the Simulink® documentation
Simulink Checks in the Simulink reference documentation
Real-Time Workshop® Checks in the Real-Time Workshop reference documentation
Check for blocks that do not use one-based indexing.
Use one-based indexing for:
Readability
Workflow
Code generation
See MAAB guideline db_0112: Indexing.
| Condition | Recommended Action |
|---|---|
| Blocks in your model are not configured for one-based indexing. | Using block parameters, configure all blocks for one-based indexing. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB®, Simulink, and Stateflow®
Check for files residing in the same directory as the model that have illegal file names.
Use standard file names for:
Readability
Workflow
See MAAB guideline ar_0001: Filenames.
| Condition | Recommended Action |
|---|---|
| The file name contains illegal characters. | Rename the file. Allowed characters are a–z, A–Z, 0–9. and underscore (_). |
| The file name starts with a number. | Rename the file. |
| The file name starts with an underscore ("_"). | Rename the file. |
| The file name ends with an underscore ("_"). | Rename the file. |
| The file extension contains one (or more) underscores. | Change the file extension. |
| The file name has consecutive underscores. | Rename the file. |
| The file name contains more than one dot ("."). | Rename the file. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Checks model directory and subdirectory names for invalid characters.
Use standard directory names for:
Readability
Workflow
See MAAB guideline ar_0002: Directory names.
| Condition | Recommended Action |
|---|---|
| The directory name contains illegal characters. | Rename the directory. Allowed characters are a–z, A–Z, 0–9. and underscore (_). |
| The directory name starts with a number. | Rename the directory. |
| The directory name starts with an underscore ("_"). | Rename the directory. |
| The directory name ends with an underscore ("_"). | Rename the directory. |
| The directory name has consecutive underscores. | Rename the directory. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for blocks that are not discrete.
You must design controller models using discrete blocks. Continuous blocks are not allowed. Use discrete blocks for:
Readability
Workflow
Code generation
See MAAB guideline jm_0001: Prohibited Simulink standard blocks inside controllers.
| Condition | Recommended Action |
|---|---|
| Continuous blocks are not permitted in models representing discrete controllers. | Replace continuous blocks with the corresponding discrete blocks. You might need to adjust parameter values in the block to take into account the change from continuous to discrete sample time. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for prohibited Simulink sink blocks.
You must design controller models from discrete blocks. Sink blocks, such as the Scope block, are not allowed for:
Readability
Workflow
See MAAB guideline hd_0001: Prohibited Simulink Sink blocks.
| Condition | Recommended Action |
|---|---|
| Sink blocks are not permitted in discrete controllers. | Remove sink blocks from the model. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check whether the model contains ports with invalid position and configuration.
In models, the ports must comply with the following rules for the purpose of readability:
Place Inport blocks on the left side of the diagram. Move the Inport block right only to prevent signal crossings.
Place Outport blocks on the right side of the diagram. Move the Outport block left only to prevent signal crossings.
Avoid using duplicate Inport blocks at the subsystem level if possible.
Do not use duplicate Inport blocks at the root level.
See MAAB guideline db_0042: Port block in Simulink models.
| Condition | Recommended Action |
|---|---|
| Inport blocks are too far to the right and result in left-flowing signals. | Move the specified Inport blocks to the left. |
| Outport blocks are too far to the left and result in right-flowing signals. | Move the specified Output blocks to the right. |
| Ports do not have the default orientation. | Modify the model diagram such that signal lines for output ports enter the side of the block and signal lines for input ports exit the right side of the block. |
| Ports are duplicate Inport blocks. | If the duplicate Inport blocks are in a subsystem, remove them where possible. If the duplicate Inport blocks are at the root level, remove them. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for mismatches between names of ports and their corresponding signals.
Use matching names for ports and their corresponding signals for:
Readability
Workflow
Simulation
| Condition | Recommended Action |
|---|---|
| Ports have names that differ from their corresponding signals. (See MAAB guideline jm_0010: Port block names in Simulink models.) | Revise the port names to match the naming rules. |
Prerequisite MAAB guidelines for this check are:
db_0042: Ports in Simulink models
na_0005: Port block name visibility in Simulink models
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check if block names do not appear below blocks.
If shown, the name of all blocks should appear below the blocks, for:
Readability
Workflow
See MAAB guideline db_0142: Position of block names.
| Condition | Recommended Action |
|---|---|
| Blocks have names that do not appear below the blocks. | Set the name of the block to appear below the blocks. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for systems with a mixture of primitive blocks and subsystems.
You must design every level of a model with building blocks of the same type, for example, only subsystems or only basic blocks, for:
Readability
Workflow
Verification and validation
See MAAB guideline db_0143: Similar block types on the model levels.
| Condition | Recommended Action |
|---|---|
| Systems are built from dissimilar blocks. | Move nonvirtual blocks into the subsystem. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for unconnected inputs and outputs.
All unconnected inputs should be connected to ground blocks. All unconnected outputs should be connected to terminator blocks. Respecting the guideline eliminates error messages.
In Control Algorithm Modeling Guidelines for MATLAB, Simulink, and Stateflow – Version 1.0, see MAAB guideline jm_0008: Ground and Terminator Blocks.
| Condition | Recommended Action |
|---|---|
| Blocks have unconnected inputs or outputs. | Connect the specified inputs and outputs. |
A prerequisite MAAB guideline for this check is db_0081: Unconnected signals.
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the location of Trigger, Enable, and Action Port blocks.
Locate blocks that define subsystems as either conditional or iterative at the top of the subsystem diagram for:
Readability
Workflow
Verification and validation
See MAAB guideline db_0146: Triggered, enabled, conditional Subsystems.
| Condition | Recommended Action |
|---|---|
| Trigger , Enable, and Action Port blocks are not centered in the upper third of the model diagram. | Move the Trigger, Enable, and Action Port blocks to the correct area of the model diagram. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check annotations for dropped shadows.
Annotations should not have a drop shadow for readability.
See MAAB guideline jm_0013: Annotations.
| Condition | Recommended Action |
|---|---|
| Annotations display drop shadows. | Clear the Format > Show Drop Shadow menu option. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check if tunable parameters specify expressions, data type conversions, and indexing operations.
To ensure that a parameter is tunable, you must enter the basic block:
Without any expression
Without a data type conversion
Without selection of rows or columns
This type of tunable parameter is required for:
Readability
Workflow
Code generation
See MAAB guideline db_0110: Tunable parameters in basic blocks.
| Condition | Recommended Action |
|---|---|
| Blocks have a tunable parameter that specifies an expression, data type conversion, or indexing operation. | In each case, move the calculation outside of the block, for example, by performing the calculation with a series of Simulink blocks, or precompute the value in the base workspace as a new variable. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check if local data of a Stateflow block are not defined at the chart level or below.
You must define all local data of a Stateflow block on the chart level or below in the object hierarchy. You cannot define local variables on the machine level; however, parameters and constants are allowed at the machine level. This guideline is required for:
Readability
Workflow
Verification and validation
See MAAB guideline db_0125: Scope of internal signals and local auxiliary variables.
| Condition | Recommended Action |
|---|---|
| Local data is not defined in the Stateflow hierarchy at the chart level or below. | Define local data at the chart level or below. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check whether labeled Stateflow and Simulink input and output signals are strongly typed.
Strong data typing between Stateflow and Simulink input and output signals is required for:
Readability
Workflow
Verification and validation
See MAAB guideline db_0122: Stateflow and Simulink interface signals and parameters.
| Condition | Recommended Action |
|---|---|
| A Stateflow chart does not use strong data typing with Simulink. | Select the Use Strong Data Typing with Simulink I/O check box for the specified block. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check states in state machines.
In state machines:
There must be at least two exclusive states.
A state cannot have only one substate.
The initial state of a hierarchical level with exclusive states is clearly defined by a default transition.
This is required for:
Readability
Workflow
Verification and validation
See MAAB guideline db_0137: States in state machines.
| Condition | Recommended Action |
|---|---|
| Chart has only one exclusive (OR) state. | Make the state a parallel state, or add another exclusive (OR) state. |
| Chart does not have a default state defined. | Define a default state. |
| Chart has multiple default states defined. | Define only one default state. Make the others nondefault. |
| State has only one exclusive (OR) substate. | Make the state a parallel state, or add another exclusive (OR) state. |
| State does not have a default substate defined. | Define a default substate. |
| State has multiple default substates defined. | Define only one default substate, make the others nondefault. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
A prerequisite MAAB guideline for this check is db_0149: Flowchart patterns for conditional actions.
Check the optimization parameter for Boolean data types.
Optimization for Boolean data types is required for:
Workflow
Code generation
See MAAB guideline jc_0011: Optimization parameters for Boolean data types.
| Condition | Recommended Action |
|---|---|
| Configuration setting for Implement logic signals as boolean data (vs. double) is incorrect. | Select the Implement logic signals as boolean data (vs. double) check box in the Configuration Parameters > Optimization pane. |
A prerequisite MAAB guideline for this check is na_0002: Appropriate implementation of fundamental logic and numerical operations.
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the model diagnostics configuration parameter settings.
Enabling diagnostics is required for:
Workflow
Code generation
See MAAB guideline jc_0021: Model diagnostic settings.
| Condition | Recommended Action |
|---|---|
| Algebraic loop is set to none. Otherwise, Simulink might attempt to automatically break the algebraic loops, which can affect execution order of the blocks. | Set the Configuration Parameter > Diagnostics > Solver > Algebraic loop parameter to error or warning. |
| Minimize algebraic loop is set to none. Otherwise, Simulink might attempt to automatically break the algebraic loops for reference models and atomic subsystems, which can affect the execution order for those models or subsystems. | Set the Configuration Parameter > Diagnostics > Solver > Minimize algebraic loop parameter to error or warning. |
| Inf or NaN block output is set to none, which can result in numerical exceptions in the generated code. | Set the Configuration Parameter > Diagnostics > Data Validity > Signals > Inf or NaN block output parameter to error or warning. |
| Duplicate data store names is set to none, which can result in nonunique variable naming in the generated code. | Set the Configuration Parameters > Diagnostics > Data Validity > Data Store Memory Block > Duplicate data store names parameter to error or warning. |
| Unconnected block input ports is set to none, which prevents code generation. | Set the Configuration Parameters > Diagnostics > Connectivity > Signals > Unconnected block input ports parameter to error or warning. |
| Unconnected block output ports is set to none, which can lead to dead code. | Set the Configuration Parameters > Diagnostics > Connectivity > Signals > Unconnected block output ports parameter to error or warning. |
| Unconnected line is set to none, which prevents code generation. | Set the Configuration Parameters > Diagnostics > Connectivity > Signals > Unconnected line parameter to error or warning. |
| Unspecified bus object at root Outport block is set to none, which can lead to an unspecified interface if the model is referenced from another model. | Set the Configuration Parameters > Diagnostics > Connectivity > Buses > Unspecified bus object at root Outport block parameter to error or warning. |
| Mux blocks used to create bus signals is set to none, which can lead to an unintended bus being created in the model. | Set the Configuration Parameters > Diagnostics > Connectivity > Buses > Mux blocks used to create bus signals parameter to error or warning. |
| Element name mismatch is set to none, which can lead to an incorrect interface in the generated code. | Set the Configuration Parameters > Diagnostics > Connectivity > Buses > Element name mismatch parameter to error or warning. |
| Invalid function-call connection is set to none, which can lead to an error in the operation of the generated code. | Set the Configuration Parameters > Diagnostics > Connectivity > Function Calls > Invalid function-call connection to error or warning, since this condition can lead to an error in the operation of the generated code. |
Diagnostics not listed in the Results and Recommended Actions section can be set to any value.
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the display attributes of block names.
Block names should be displayed when providing descriptive information. Block names should not be displayed if the block function is known from its appearance. This guideline is required for readability.
See MAAB guideline jc_0061: Display of block names.
| Condition | Recommended Action |
|---|---|
| Block name is not descriptive. | These block names should be modified to be more descriptive or not be shown. |
| Block name is not displayed. | These block names should be shown since they appear to have a descriptive name. |
| Block name is obvious. | These block names should not be displayed. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the Icon display setting for Inport and Outport blocks.
The Icon display setting is required for readability.
See MAAB guideline jc_0081: Icon display for port block.
| Condition | Recommended Action |
|---|---|
| The Icon display setting is incorrect. | Set the Icon display to Port number for the specified Inport and Outport blocks. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check subsystem block names for usable characters.
The names of all subsystem blocks are required to conform for:
Readability
Workflow
Code generation
See MAAB guideline jc_0201: Usable characters for Subsystem name.
| Condition | Recommended Action |
|---|---|
| The subsystem name contains illegal characters. | Rename the subsystem. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.). |
| The subsystem name starts with a number. | Rename the subsystem. |
| The subsystem name starts with an underscore ("_"). | Rename the subsystem. |
| The subsystem name ends with an underscore ("_"). | Rename the subsystem. |
| The subsystem name contains one (or more) underscores. | Rename the subsystem. |
| The subsystem name has consecutive underscores. | Rename the subsystem. |
| The subsystem name has blank spaces. | Rename the subsystem. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Use underscores to separate parts of a subsystem name instead of spaces.
Check Inport and Outport block names for usable characters.
The names of all Inport and Outport blocks are required to conform for:
Readability
Workflow
Code generation
See MAAB guideline jc_0211: Usable character for Inport block and Outport block.
| Condition | Recommended Action |
|---|---|
| The block name contains illegal characters. | Rename the block. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.). |
| The block name starts with a number. | Rename the block. |
| The block name starts with an underscore ("_"). | Rename the block. |
| The block name ends with an underscore ("_"). | Rename the block. |
| The block name contains one (or more) underscores. | Rename the block. |
| The block name has consecutive underscores. | Rename the block. |
| The block name has blank spaces. | Rename the block. |
Use underscores to separate parts of a block name instead of spaces.
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check signal line names for usable characters.
The names of all signal lines are required to conform for:
Readability
Workflow
Code generation
See MAAB guideline jc_0221: Usable characters for signal line name.
| Condition | Recommended Action |
|---|---|
| The signal line name contains illegal characters. | Rename the signal line. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.). |
| The signal line name starts with a number. | Rename the signal line. |
| The signal line name starts with an underscore ("_"). | Rename the signal line. |
| The signal line name ends with an underscore ("_"). | Rename the signal line. |
| The signal line name contains one (or more) underscores. | Rename the signal line. |
| The signal line name has consecutive underscores. | Rename the signal line. |
| The signal line name has blank spaces. | Rename the signal line. |
| The signal line name has control characters. | Rename the signal line. |
Use underscores to separate parts of a signal line name instead of spaces.
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check block names for usable characters.
The names of all blocks are required to conform for:
Readability
Workflow
Code generation
This guideline does not apply to subsystem blocks.
See MAAB guideline jc_0221: Usable characters for signal line name.
| Condition | Recommended Action |
|---|---|
| The block name contains illegal characters. | Rename the block. Allowed characters include a–z, A–Z, 0–9, underscore (_), and period (.). |
| The block name starts with a number. | Rename the block. |
| The block name has blank spaces. | Rename the block. |
| The block name has double byte characters. | Rename the block. |
A prerequisite MAAB guideline for this check is jc_0201: Usable characters for Subsystem names.
Carriage returns are allowed in block names.
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check Trigger and Enable block port names.
Block port names should match the name of the signal triggering the subsystem. This guideline is required for readability.
| Condition | Recommended Action |
|---|---|
| Trigger block does not match the name of the signal to which it is connected. | Match Trigger block names to the connecting signal. |
| Enable block does not match the name of the signal to which it is connected. | Match Enable block names to the connecting signal. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check model appearance setting attributes.
Model appearance settings are required to conform to the guidelines when the model is released for:
Readability
Workflow
See MAAB guideline na_0004: Simulink model appearance.
| Condition | Recommended Action |
|---|---|
| Diagrams do not have white backgrounds. | Select Format > Screen Color > Automatic. |
| Diagrams do not have zoom factor set to 100%. | Select View > Normal (100%). |
| The toolbar is not visible. | Select View > Toolbar. |
| The status bar is not visible. | Select View > Status Bar. |
| Block backgrounds are not white. | Blocks should have black foregrounds with white backgrounds. Click the specified block and select Format > Foreground Color > Black and Format > Background Color > White. |
| Wide Nonscalar Lines is cleared. | Select Format > Port/Signal Displays > Wide Nonscalar Lines. |
| Viewer Indicators is cleared. | Select Format > Port/Signal Displays > Viewer Indicators. |
| Testpoint Indicators is cleared. | Select Format > Port/Signal Displays > Testpoint Indicators. |
| Port Data Types is selected. | Clear Format > Port/Signal Displays > Port Data Types. |
| Storage Class is selected. | Clear Format > Port/Signal Displays > Storage Class. |
| Signal Dimensions is selected. | Clear Format > Port/Signal Displays > Signal Dimensions. |
| Model Browser is selected. | Clear View > Model Browser Options > Model Browser. |
| Sorted Order is selected. | Clear Format > Block Displays > Sorted Order. |
| Model Block Version is selected. | Clear Format > Block Displays > Model Block Version. |
| Model Block I/O Mismatch is selected. | Clear Format > Block Displays > Model Block I/O Mismatch. |
| Execution Context Indicator is selected. | Clear Format > Block Displays > Execution Context Indicator. |
| Sample Time Colors is selected. | Clear Format > Port/Signal Displays > Sample Time Colors. |
| Library Link Display is set to User or All. | Select Format > Library Link Display > None. |
| Linearization Indicators is cleared. | Select Format > Port/Signal Displays > Linearization Indicators. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the visibility of port block names.
An organization applying the MAAB guidelines must select one of the following alternatives to enforce:
The name of port blocks are not hidden.
The name of port blocks must be hidden.
This guideline is required for readability.
Note This check does not look in masked subsystems. |
See MAAB guideline na_0005: Port block name visibility in Simulink models.
Select this check box if all ports should show the name, including subsystems.
| Condition | Recommended Action |
|---|---|
| Blocks do not show their name and the All Port names should be shown (Format/Show Name) check box is selected. | Change the format of the specified blocks to show names according to the input requirement. |
| Blocks show their name and the All Port names should be shown (Format/Show Name) check box is cleared. | Change the format of the specified blocks to hide names according to the input requirement. |
| Subsystem blocks do not show their port names. | Set the subsystem parameter Show port labels to a value other than none. |
| Subsystem blocks show their port names. | Set the subsystem parameter Show port labels to none. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the orientation of subsystem blocks.
Subsystem inputs must be located on the left side of the block, and outputs must be located on the right side of the block. This guideline is required for readability.
See MAAB guideline jc_0111: Direction of Subsystem.
| Condition | Recommended Action |
|---|---|
| Subsystem blocks are not in the correct orientation. | Change the subsystem blocks to have the correct orientation, with inports on the left and outports on the right. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the position of Constant blocks used in Relational Operator blocks.
When the relational operator is used to compare a signal to a constant value, the constant input should be the second, lower input. This guideline is required for:
Readability
Code generation
See MAAB guideline jc_0131: Use of Relational Operator block.
| Condition | Recommended Action |
|---|---|
| Relational Operator blocks have a Constant block on the first, upper input. | Move the Constant block to the second, lower input. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the format of entries in state blocks.
A new line should be started after the entry, during, and exit action statements and after the completion of an assignment statement ";". This guideline is required for readability.
See MAAB guideline jc_0501: Format of entries in a State block.
| Condition | Recommended Action |
|---|---|
| An entry action statement is not by itself. | Add a new line. |
| Multiple entry action statements found on one line. | Add a new line between entry action statements. |
| An during action statement is not by itself. | Add a new line. |
| Multiple during action statements found on one line. | Add a new line between during action statements. |
| An exit action statement is not by itself. | Add a new line. |
| Multiple exit action statements found on one line. | Add a new line between exit action statements. |
| Multiple action statements found on one line. | Add a new line between action statements. |
| Potential misuse of semicolon (;) on a line. | Correct the use of the semicolon where specified. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for use of tunable parameters in Stateflow charts.
Include tunable parameters in a Stateflow chart as inputs from the Simulink model. This guideline is required for:
Readability
Workflow
Code generation
See MAAB guideline jc_0541: Use of tunable parameters in Stateflow.
| Condition | Recommended Action |
|---|---|
| Stateflow charts reference Simulink data objects, which should be used as inputs from the Simulink model. | Make the Simulink data objects inputs from the Simulink model to the specified Stateflow chart. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check for mismatches between Stateflow ports and associated signal names.
The name of Stateflow input and output should be the same as the corresponding signal. This guideline is required for:
Readability
Workflow
See MAAB guideline db_0123: Stateflow port names.
| Condition | Recommended Action |
|---|---|
| Signals have names that differ from those of their corresponding Stateflow ports. | Change the names of either the signals or the Stateflow ports. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Check the scope of From and Goto blocks.
You can use global scope for controlling flow. However, From and Goto blocks must use local scope for signal flows. This guideline is required for:
Readability
Workflow
Code generation
See MAAB guideline na_0011: Scope of Goto and From blocks.
| Condition | Recommended Action |
|---|---|
| From and Goto blocks are not configured with local scope. | Change the scope of the specified blocks to local. |
The MathWorks Automotive Advisory Board, which lists downloads for the latest version of Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow
![]() | IEC 61508 Checks | Requirements Consistency Checks | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |