Model Configuration Parameters: Code Generation Interface
The Code Generation > Interface 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 Code Generation > Interface pane.
Parameter | Description |
---|---|
Specify a code replacement library the code generator uses when producing code for a model. | |
Specify multiple code replacement libraries the code generator use when producing code for a model. | |
Specify the location for generating utility functions, exported data type definitions, and declarations of exported data with custom storage class. | |
Specify whether to generate floating-point data and operations. | |
Specify whether to generate non-finite data and operations on non-finite data. | |
Specify whether to generate complex data and operations. | |
Specify whether to generate and maintain integer counters for absolute and elapsed time values. | |
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. | |
Specify whether to generate code for models that use variable-size signals. | |
Select the packaging for the generated C or C++ code interface. | |
Select the severity level for diagnostics displayed when a model violates requirements for generating multi-instance code. | |
Control how root-level model input and output are passed to the
reusable | |
Specify whether to log or monitor error status. | |
Specify whether to generate model type definitions in a model class. | |
Specify layout of array data for code generation as column-major or row-major | |
External functions compatibility for row-major code generation | Select diagnostic action if Simulink encounters a function that has no specified array layout |
Generate C API data interface code with a signals structure. | |
Generate C API data interface code with parameter tuning structures. | |
Generate C API data interface code with a states structure. | |
Generate C API data interface code with a root-level I/O structure. | |
Generate code for the ASAP2 data interface. | |
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. | |
Specify the transport protocol for communications. | |
Specify arguments to pass to an external mode interface MEX-file for communicating with executing targets. | |
Control memory buffer for external mode communication. | |
Specify the memory buffer size for external mode communication. | |
Automatically allocate static memory for buffers used in external mode communication. | |
Specify, in base rate steps, maximum duration that software must consider when determining size of static memory required for external mode communication. | |
Log signal and output data from generated code to MDF file. | |
Specify the target deep learning library used during code generation.
| |
Specify the compression type, "none" or
"bfloat16" . | |
Specify the version of ARM® Compute Library. | |
Specify the ARM architecture supported in the target hardware. | |
Deep Learning Data Type | Specify the data type to be used by TensorRT library for deep learning code generation. This parameter requires a GPU Coder license. |
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.
Parameter | Description |
---|---|
Specify whether to generate code for non-inlined S-functions. This parameter does not apply when you use Embedded Coder for a component model that is configured with a service interface. | |
Specify a maximum word length, in bits, for which the code generation process generates system-defined multiword type definitions. | |
Number of bytes of the character buffer generated for dynamic string signals without maximum length. | |
Specify whether to use system-defined or user-defined type definitions for multiword data types in generated code. | |
Control how the generated code allocates memory for model data. | |
Specify whether to generate the
This parameter does not apply when you use Embedded Coder for a component model that is configured with a service interface. | |
Specify whether to generate the
| |
Specify whether to combine global block signals and global state data into one data structure in the generated code You cannot clear this parameter when you use Embedded Coder for a component model that is configured with a service interface. | |
Generate separate internal data per entry-point function | Generate a model's block signals (block I/O) and discrete states (DWork) acting at the same rate into the same data structure. |
Specify MAT-file logging. This parameter does not apply when you use Embedded Coder for a component model that is configured with a service interface. | |
Select the text to add to MAT-file variable names. | |
Specify folder that contains existing shared code | |
Control generation of preprocessor directives that perform fixed-point word size checks | |
Remove unreachable (dead-code) instances of
the | |
Remove unreachable (dead-code) instances of
the | |
Change the order of the fields in the generated structure for a lookup table object whose specification parameter is set to even spacing. | |
Change the order of the fields in the generated structure for a lookup table object whose specification parameter is set to explicit value. | |
Specify whether to generate a destructor for the C++ model class. | |
Specify whether generated code uses the operator
| |
Specify whether to apply or ignore custom storage classes. | |
Specify allocation of memory buffers for test points. | |
Create unique variables for each read/write operation of a Data Store Memory block. | |
Generate full header banner including time stamp. |
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 |
InferredTypesCompatibility | For compatibility with legacy code including
|
TargetLibSuffix
- '' | Control the suffix used for naming a target's dependent libraries
(for example, This parameter does not apply for model builds that use the toolchain approach, see Library Control Parameters |
TargetPreCompLibLocation - '' | Control the location of precompiled libraries. If you do not set
this parameter, the code generator uses the location specified in
|
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. |
| Set in Default is
|
ModelReferenceCompliant character 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. |