Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

コード生成のコンフィギュレーション セット

シミュレーションおよびコード生成用のモデル構成

コード生成用のモデル コンフィギュレーション パラメーターは、コード ジェネレーターによるコードの生成方法と、モデルから実行可能ファイルを作成する方法を定義します。

モデル設定

すべて展開する

共有コーダー ディクショナリEmbedded Coder Dictionary that contains code interface configuration for code generation
優先順位が設定された目的Prioritized list of Code Generation Advisor objectives to apply for reviewing model configuration parameter settings

データの初期化

ルート レベル I/O のゼロ初期化を削除Control generation of initialization code for root-level inports and outports set to zero
内部データのゼロ初期化を削除Control generation of Initialization code for internal work structures, such as block states and block outputs, to zero

最適化レベル

レベルOptimization level for generated code
優先順位Control application of optimizations based on priority
カスタム最適化を指定Enable option to choose individual optimization parameters
配列のインデックスを簡略化するReplace multiply operations in array indices when accessing arrays in a loop
並列 for ループの生成並列 for ループの最適化
boolean データをビットフィールドにパッキングControl storing Boolean signals
サイズと次元が異なるバッファーの再利用Reuse buffers to store data of different sizes and dimensions
グローバル データ アクセスの最適化Optimize global variable usage
生成されたコードにおけるブロック演算順序の最適化Specify to reorder block operations for improved code execution speed
グローバル ブロック出力の再利用Optimization to reuse global variables
Model ブロックの出力バッファーを再利用するReuse referenced model buffers if possible
Assignment ブロックおよび Bus Assignment ブロックの更新でインプレース更新を実行するReuse the input and output variables of Bus Assignment and Assignment blocks
Data Store Read ブロックと Data Store Write ブロックのバッファーの再利用Eliminate temporary buffers for Data Store Read and Data Store Write blocks
ビットフィールド宣言子の型指定子Specify bitfield type
再利用可能なサブシステムの出力を渡すControl how a reusable subsystem passes outputs

詳細設定パラメーター

指定した最小値と最大値を使用した最適化Optimize using minimum and maximum values for signals and parameters
調整可能なパラメーター式から範囲外の値を飽和させるコードを削除Control generation of protective code that saturates out-of-range tunable parameter expression values
除算演算の例外処理を防止するコードを削除Control generation of protective code for division arithmetic exceptions
バッファーの再利用のガイドとして信号のラベルを使用Reuse buffers by using signal labels
Bitwise Operator ブロックと Logical Operator ブロックを表す演算子Specify operator type in generated code
コードからモデルにモデルのブロック線図にリンクするハイパーリンクをコード生成レポートに含める
モデルからコードにEnable code highlighting in the code generation report when you click on Simulink blocks, Stateflow objects, and MATLAB functions
削除された / バーチャル ブロックInclude a summary of eliminated and virtual blocks in the code generation report
追跡可能な Simulink ブロックInclude a summary of Simulink blocks and the corresponding code locations in the code generation report
追跡可能な Stateflow オブジェクトInclude a summary of Stateflow objects and the corresponding code locations in the code generation report
追跡可能な MATLAB 関数Include a summary of MATLAB functions and corresponding code locations in the code generation report
コード置き換えをトリガーするブロックをまとめるInclude a summary of replacement functions used and their associated blocks in the code generation report
モデルの Web ビューを生成Include the model Web view in the code generation report
静的コード メトリクス静的コード メトリクス レポートの生成
モデルへのトレースに使用Specify format of comments
演算子の注釈Include operator annotations for Polyspace in generated comments
Simulink ブロックの説明Insert descriptions of blocks as comments in generated code
Simulink データ オブジェクトの説明Include descriptions of Simulink data objects as comments in generated code
カスタム コメント (MPT オブジェクトのみ)Include comments for MPT signal and parameter data in generated code
カスタム コメント関数Specify a file that contains comments for MPT signal and parameter data objects
Stateflow オブジェクトの説明Include descriptions of Stateflow objects in generated comments
要件のブロック コメント化Include requirement descriptions in generated comments
MATLAB ユーザー コメントInclude MATLAB user comments in generated code
Polyspace コメントの挿入Include code comments for Polyspace block annotations
コメント スタイルSpecify comment style in generated code

自動生成される識別子の命名規則

グローバル変数Customize generated global variable identifiers
グローバルなタイプCustomize generated global type identifiers
グローバルなタイプのフィールド名Customize generated field names of global types
サブシステムのメソッドCustomize generated function names for reusable subsystems
サブシステムのメソッド引数Customize generated function argument names for reusable subsystems
ローカルな一時変数Customize generated local temporary variable identifiers
ローカルなブロックの出力変数Customize generated local block output variable identifiers
定数のマクロCustomize generated constant macro identifiers
マングルの最小の長さSpecify the minimum number of characters for name-mangling
システム生成の識別子Specify whether to use shorter names for the $N token in system-generated identifiers
スカラーのインライン パラメーターの生成Express scalar inlined parameter values in the generated code as literals or macros

詳細設定パラメーター

共有チェックサム長Specify character length of $C token
EMX 配列ユーティリティ関数識別子の形式Customize generated identifiers for emxArray utility functions
EMX 配列タイプ識別子の形式Customize generated identifiers for emxArray types
共有ユーティリティ識別子の形式Customize shared utility identifiers
カスタム トークン テキストSpecify text to insert for $U token
信号名Specify rules for naming mpt signals in generated code
M 関数Specify rules for naming identifiers in generated code
#define 定義名生成コードの #define パラメーターの命名規則を指定
M 関数Specify rule for naming identifiers in generated code
パラメーター名生成コードの mpt パラメーターの命名規則を指定
M 関数Specify rules for naming identifiers in generated code
かっこのレベルParenthesization style for generated code
式のオペランドの順番を保持するPreserve order of operands in expressions
if ステートメント内の条件式を保持するPreserve empty primary conditions in if statements
if-elseif-else のパターンを switch-case ステートメントに変換するGenerate code for if-elseif-else logic as switch-case statements
関数の宣言で extern キーワードを保持するInclude extern keyword in function declarations
関数宣言に static キーワードを保持Include static keyword in function declarations
到達不可能な場合、Stateflow switch ステートメントの default ケースを生成しないWhether to generate default cases for switch-case statements for Stateflow charts
2 のべき乗での乗算を符号付きのビット単位シフトに置換Replace multiplications by powers of two with signed bitwise shifts
符号付き整数の右シフトを許可Allow right bitwise shifts on signed integers
キャスト モードMethod of casting data types for variables
配列のコンテナー タイプContainer type for arrays
インデント スタイルStyle for placement of braces
インデント サイズSize for indents in generated code
改行スタイルNewline character in generated code
最大ライン幅Maximum line width for wrapping generated code
コード テンプレート: ソース ファイル (*.c) テンプレートSource code file template
コード テンプレート: ヘッダー ファイル (*.h) テンプレートTemplate for generated code header
データ テンプレート: ソース ファイル (*.c) テンプレートTemplate for generated data source file
データ テンプレート: ヘッダー ファイル (*.h) テンプレートTemplate for generated data header file
ファイル カスタマイズ テンプレートTemplate for custom file processing
メイン プログラム例の生成Control generation of example main program
ターゲット オペレーティング システムTarget operating system for example main program
完全なファイル バナーの生成Include code generation information in header file banner
カスタム ファイル バナーを有効にするControl whether to use configurations for code and data templates
データ定義Placement of global variable definitions
データ定義ファイル名File to contain data definitions
データ宣言Location for data declarations
データ宣言ファイル名File to contain deta declarations
#ファイル区切り文字を含めるType of delimiter for include file
データ定義の配置にデータ オブジェクトからオーナーを使用するWhether to use data ownership setting for definition in code
信号の表示レベルPersistence level for MPT signal data objects
パラメーター調整レベルPersistence level for MPT parameter data objects
ファイル パッケージ化形式Method of file packaging for generated code files
ヘッダー ファイルCustom name for header files
ソース ファイルCustom name for source files
データ ファイルCustom name for data files
Rate Transition ブロック コードFormat for rate transition block code and data

オブジェクト

すべて展開する

rtw.codegenObjectives.ObjectiveCustom code generation objective

ブロック

すべて展開する

Custom MATLAB fileカスタム MATLAB コードを含むファイルを使用して親モデルのアクティブなコンフィギュレーション パラメーターを更新
ERT (optimized for fixed-point)Update active configuration parameters of parent model for ERT fixed-point code generation
ERT (optimized for floating-point)Update active configuration parameters of parent model for ERT floating-point code generation
GRT (debug for fixed/floating-point)Update active configuration parameters of parent model for GRT fixed-point or floating-point code generation
GRT (optimized for fixed/floating-point)Update active configuration parameters of parent model for GRT fixed-point or floating-point code generation

トピック

コード生成の構成

モデル コンフィギュレーション パラメーター: コード生成