Code Generation Advisor Checks - MATLAB & Simulink (original) (raw)

Available Checks for Code Generation Objectives

Code generation objectives checks facilitate designing and troubleshooting Simulink® models and subsystems that you want to use to generate code. For more information about code generation objectives, see Application Objectives Using Code Generation Advisor.

The Code Generation Advisor includes the following checks from Simulink, Simulink Coder™, and Embedded Coder® for each of the code generation objectives. Two checks unique to the Code Generation Advisor are included below the list.

Note

When the Code Generation Advisor checks your model against the MISRA C:2012 guidelines objective, the tool does not consider all of the configuration parameter settings that are checked by the MISRA C:2012 guidelines checks in the Model Advisor. For a complete check of configuration parameter settings:

  1. Open the Model Advisor.
  2. Navigate to > .
  3. Run the checks in the folder.

For more information on using the Model Advisor, see Check Your Model Using the Model Advisor.

See Also

Identify questionable blocks within the specified system

Identify blocks not supported by code generation or not recommended for deployment.

Description

The code generator creates code only for the blocks that it supports. Some blocks are not recommended for production code deployment.

Condition Recommended Action
A block is not supported by the code generator. Remove the specified block from the model or replace the block with the recommended block.
A block is not recommended for production code deployment. Remove the specified block from the model or replace the block with the recommended block.
Check for Gain blocks whose value equals 1. Replace Gain blocks with Signal Conversion blocks.

Capabilities and Limitations

You can:

See Also

Use Products and Blocks Supported for Code Generation

Model Advisor Exclusion Overview (Simulink Check)

Check model configuration settings against code generation objectives

Check the configuration parameter settings for the model against the code generation objectives.

Description

Each parameter in the Configuration Parameters dialog box might have different recommended settings for code generation based on your objectives. This check helps you identify the recommended setting for each parameter so that you can achieve optimized code based on your objective.

Condition Recommended Action
Parameters are set to values other than the value recommended for the specified objectives. Set the parameters to the recommended values. NoteA change to one parameter value can impact other parameters. Passing the check might take multiple iterations.

Action Results

Clicking Modify Parameters under Action in the check window changes the parameter values to the recommended values.

See Also