Model Configuration Parameters: Code Generation Interface - MATLAB & Simulink (original) (raw)
The > category includes parameters for configuring the interface of the generated code. These parameters require a Simulink® Coder™ license. Additional parameters available with an ERT-based target require an Embedded Coder® license. Generating code for deep learning models using NVIDIA® CUDA® deep neural network library (cuDNN) or TensorRT™ high performance inference libraries for NVIDIA GPUs requires a GPU Coder™ license.
On the Configuration Parameters dialog box, the following configuration parameters are on the > pane.
Parameter | Description |
---|---|
Code replacement library (Simulink Coder) | Specify a code replacement library the code generator uses when producing code for a model. |
Code replacement libraries (Embedded Coder) | Specify multiple code replacement libraries the code generator use when producing code for a model. |
Shared code placement (Simulink Coder) | Specify the location for generating utility functions, exported data type definitions, and declarations of exported data with custom storage class. |
Support: floating-point numbers (Embedded Coder) | Specify whether to generate floating-point data and operations. |
Support: non-finite numbers (Simulink Coder) | Specify whether to generate non-finite data and operations on non-finite data. |
Support: complex numbers (Embedded Coder) | Specify whether to generate complex data and operations. |
Support: absolute time (Embedded Coder) | Specify whether to generate and maintain integer counters for absolute and elapsed time values. |
Support: continuous time (Embedded Coder) | Specify whether to generate code for blocks that use continuous time.This parameter does not apply when you use Embedded Coder for a component model that is configured with a service interface. |
Support: variable-size signals (Embedded Coder) | Specify whether to generate code for models that use variable-size signals. |
Code interface packaging (component) (Simulink Coder) | Select the packaging for the generated C or C++ code interface. |
Code interface packaging (subcomponent) (Simulink Coder) | Select the packaging for the generated C or C++ code subcomponent interface. |
Multi-instance code error diagnostic (Simulink Coder) | Select the severity level for diagnostics displayed when a model violates requirements for generating multi-instance code. |
Pass root-level I/O as (Embedded Coder) | Control how root-level model input and output are passed to the reusable model_step function. |
Implement root-level I/O as (Embedded Coder) | Control how root-level model input and output are passed to the nonreusable subcomponent_model__step function. |
Remove error status field in real-time model data structure (Embedded Coder) | Specify whether to log or monitor error status. |
Preserve MATLAB namespaces in generated code (Embedded Coder) | Specify whether generated code for enumeration in MATLAB® namespace includes the namespace in the type definition. |
Include model types in model class (Embedded Coder) | Specify whether to generate model type definitions in a model class. |
Array layout (Simulink Coder) | Specify layout of array data for code generation as column-major or row-major |
External functions compatibility for row-major code generation (Simulink Coder) | Select diagnostic action if Simulink encounters a function that has no specified array layout |
Generate C API for: signals (Simulink Coder) | Generate C API data interface code with a signals structure. |
Generate C API for: parameters (Simulink Coder) | Generate C API data interface code with parameter tuning structures. |
Generate C API for: states (Simulink Coder) | Generate C API data interface code with a states structure. |
Generate C API for: root-level I/O (Simulink Coder) | Generate C API data interface code with a root-level I/O structure. |
External mode (Simulink Coder) | Generate code for the external mode data interface. When using Embedded Coder for a component model that is configured with a service interface, this parameter is not relevant and, therefore, is not supported. |
Transport layer (Simulink Coder) | Specify the transport protocol for communications. |
MEX-file arguments (Simulink Coder) | Specify arguments to pass to an external mode interface MEX-file for communicating with executing targets. |
Static memory allocation (Simulink Coder) | Control memory buffer for external mode communication. |
Static memory buffer size (Simulink Coder) | Specify the memory buffer size for external mode communication. |
Automatically allocate static memory (Simulink Coder) | Automatically allocate static memory for buffers used in external mode communication. |
Maximum duration (Simulink Coder) | Specify, in base rate steps, maximum duration that software must consider when determining size of static memory required for external mode communication. |
Log signals to MDF file (Simulink Coder) | Log signal and output data from generated code to MDF file. |
Target library (Simulink Coder) | Specify the target deep learning library used during code generation.cuDNN orTensorRT requires a GPU Coder license. |
Learnables Compression (Simulink Coder) | Specify the compression type, "none" or"bfloat16". |
ARM Compute Library version (Simulink Coder) | Specify the version of ARM® Compute Library. |
ARM Compute Library architecture (Simulink Coder) | Specify the ARM architecture supported in the target hardware. |
Deep Learning Data Type (Simulink Coder) | Specify the data type to be used by TensorRT library for deep learning code generation.This parameter requires a GPU Coder license. |
Auto tuning (Simulink Coder) | Use auto tuning for cuDNN library. Enabling auto tuning allows the cuDNN library to find the fastest convolution algorithms.This parameter requires a GPU Coder license. |
These configuration parameters are under the Advanced parameters.
The following parameters under the Advanced parameters are infrequently used and have no other documentation.
Parameter | Description |
---|---|
GenerateSharedConstants | Control whether the code generator generates code with shared constants and shared functions. Default is on. When turned off, the code generator does not generate shared constants. |
InferredTypesCompatibility | For compatibility with legacy code includingtmwtypes.h, specify that the code generator creates a preprocessor directive #define __TMWTYPES__ inside_model_.h. |
TargetLibSuffix character vector - '' | Control the suffix used for naming a target's dependent libraries (for example, _target.lib or_target.a). If specified, the character vector must include a period (.). (For generated model reference libraries, the library suffix defaults to _rtwlib.lib on Windows® systems and _rtwlib.a on UNIX® systems.).This parameter does not apply for model builds that use the toolchain approach, see Library Control Parameters (Simulink Coder) |
TargetPreCompLibLocation character vector - '' | Control the location of precompiled libraries. If you do not set this parameter, the code generator uses the location specified inrtwmakecfg.m. |
IsERTTarget | Indicates whether or not the currently selected target is derived from the ERT target. |
CPPClassGenCompliant | Indicates whether the target supports the ability to generate and configure C++ class interfaces to model code. |
ConcurrentExecutionCompliant | Indicates whether the target supports concurrent execution |
UseToolchainInfoCompliant | Indicate a custom target is toolchain-compliant. |
ModelStepFunctionPrototypeControlCompliant | Indicates whether the target supports the ability to control the function prototypes of initialize and step functions that are generated for a Simulink model.This parameter does not apply when you use Embedded Coder for a component model that is configured with a service interface. |
ParMdlRefBuildCompliant | Indicates if the model is configured for parallel builds when building a model that includes referenced models. |
CompOptLevelCompliant off,on | Set in SelectCallback for a target to indicate whether the target supports the ability to use the Compiler optimization level parameter to control the compiler optimization level for building generated code.Default isoff for custom targets and on for targets provided with the Simulink Coder and Embedded Coder products. |
ModelReferenceCompliantcharacter vector - off, on | Set in SelectCallback for a target to indicate whether the target supports model reference. |
The following parameters are for MathWorks use only.
Parameter | Description |
---|---|
ExtModeTesting | For MathWorks use only. |
ExtModeIntrfLevel | For MathWorks use only. |
ExtModeMexFile | For MathWorks use only. |
See Also
Topics
- Model Configuration Set Customization (Simulink Coder)