Model Configuration Parameters: Simulation Target

The Simulation Target category includes parameters for configuring the simulation target for a model that contains MATLAB Function blocks, Stateflow® charts, or Truth Table blocks.

ParameterDescription

Import custom code

Specify whether or not to parse the custom code and report unresolved symbols in a model. This setting applies to all C charts in the model, including library link charts.

Source file

Enter code lines to appear near the top of a generated source code file.

Header file

Enter code lines to appear near the top of a generated header file.

Initialize function

Enter code statements that execute once at the start of simulation.

Terminate function

Enter code statements that execute at the end of simulation.

Include directories

Specify a list of folder paths that contain files you include in the compiled target.

Source files

Specify a list of source files to compile and link into the target.

Libraries

Specify a list of static libraries that contain custom object code to link into the target.

Reserved names

Enter the names of variables or functions in the generated code that match the names of variables or functions specified in custom code for a model that contains MATLAB Function blocks, Stateflow charts, or Truth Table blocks.

Defines

Specify preprocessor macro definitions to be added to the compiler command line.

Use local custom code settings (do not inherit from main model)

Specify if a library model can use custom code settings that are unique from the main model. (This parameter is read-only)

Default function array layout

Specify the default array layout for all external C functions used by C Caller block.

Undefined Function Handling

Specify undefined function behaviour for all external C functions called by C Caller, MATLAB Function, MATLAB System blocks or Stateflow charts.

Specify by function

Specify the array layout for each external C function used by the C Caller block.

These configuration parameters are in the Advanced parameters section.

ParameterDescription

Echo expressions without semicolons

Enable run-time output in the MATLAB® Command Window, such as actions that do not terminate with a semicolon.

Simulation target build mode

Specifies how you build the simulation target for a model that contains MATLAB Function blocks, Stateflow charts, or Truth Table blocks.

Ensure responsiveness

Enables responsiveness checks in code generated for MATLAB Function blocks, Stateflow charts, and dataflow domains.

Generate typedefs for imported bus and enumeration types

Determines typedef handling and generation for imported bus and enumeration data types in Stateflow and MATLAB Function blocks.

Ensure memory integrity

Detects violations of memory integrity in code generated for MATLAB Function blocks and stops execution with a diagnostic.

Enable run-time recursion for MATLAB functions

Allow recursive functions in code that is generated for MATLAB code that contains recursive functions.

Compile-time recursion limit for MATLAB functions

For compile-time recursion, control the number of copies of a function that are allowed in the generated code.

Block reduction

Reduce execution time by collapsing or removing groups of blocks.

Compiler optimization level

Sets the degree of optimization used by the compiler when generating code for acceleration.

Conditional input branch execution

Improve model execution when the model contains Switch and Multiport Switch blocks.

Signal storage reuse (Simulink Coder)

Reuse signal memory.

Verbose accelerator builds

Select the amount of information displayed during code generation for Simulink® Accelerator mode, referenced model Accelerator mode, and Rapid Accelerator mode.

Dynamic memory allocation in MATLAB functions

Use dynamic memory allocation (malloc) for variable-size arrays whose size (in bytes) is greater than or equal to the dynamic memory allocation threshold. This parameter applies to MATLAB code in a MATLAB Function block, a Stateflow chart, or a System object associated with a MATLAB System block.

Dynamic memory allocation threshold in MATLAB functions

Use dynamic memory allocation (malloc) for variable-size arrays whose size (in bytes) is greater than or equal to a threshold. This parameter applies to MATLAB code in a MATLAB Function block, a Stateflow chart, or a System object associated with a MATLAB System block.

Allow setting breakpoints during simulation

Enable debugging and animation during simulation of a model that contains MATLAB Function blocks, Stateflow charts, State Transition blocks, or Truth Table blocks.

Related Topics