Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

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

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

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

モデル設定

すべて展開する

共有コーダー ディクショナリコード生成用のコード インターフェイスの設定を含む Embedded Coder ディクショナリ (R2022b 以降)
Halide コードの生成Generate Halide code for faster array computation (R2023b 以降)
優先順位が設定された目的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 データをビットフィールドにパッキングboolean 信号の格納の制御
サイズと次元が異なるバッファーの再利用Reuse buffers to store data of different sizes and dimensions
グローバル データ アクセスの最適化グローバル変数の使用の最適化
生成コードにおけるブロック演算順序の最適化Specify to reorder block operations for improved code execution speed
グローバル ブロック出力の再利用最適化によるグローバル変数の再利用
Model ブロックの出力バッファーを再利用する可能な場合は参照モデルのバッファーを再利用 (R2022b 以降)
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
再利用可能なサブシステムの出力を渡す再利用可能なサブシステムによって出力が渡される形式の制御

詳細設定パラメーター

指定した最小値と最大値を使用した最適化Optimize using minimum and maximum values for signals and parameters
調整可能なパラメーター式から範囲外の値を飽和させるコードを削除Control generation of protective code that saturates out-of-range tunable parameter expression values (R2019b 以降)
除算演算の例外処理を防止するコードを削除除算演算の例外処理を防止するコードの生成の制御
バッファーの再利用のガイドとして信号のラベルを使用Reuse buffers by using signal labels
Bitwise Operator ブロックと Logical Operator ブロックを表す演算子Specify operator type in generated code (R2020a 以降)
コードからモデルにモデルのブロック線図にリンクするハイパーリンクをコード生成レポートに含める
モデルからコードに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 ビューを生成コード生成レポートにモデルの Web ビューを含める
静的コード メトリクス静的コード メトリクス レポートの生成
モデルへのトレースに使用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 ユーザー コメント生成コードに MATLAB ユーザー コメントを含める
Polyspace コメントの挿入Polyspace ブロックの注釈のコード コメントを含める
コメント スタイル生成コードのコメント スタイルを指定

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

グローバル変数生成されたグローバル変数の識別子をカスタマイズする
グローバルなタイプCustomize generated global type identifiers
グローバルなタイプのフィールド名Customize generated field names of global types
サブシステムのメソッドCustomize generated function names for subsystems and Simulink functions
サブシステムのメソッド引数Customize generated function argument names for subsystems and Simulink functions
ローカルな一時変数Customize generated local temporary variable identifiers
ローカルなブロックの出力変数Customize generated local block output variable 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
カスタム トークン テキスト$U トークンに挿入するテキストの指定
信号名生成コードでの mpt 信号の命名規則を指定
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

ソフトウェア環境

コード置換ライブラリLibraries that define code optimizations for specific target environment
サポート: 浮動小数点数Code generation for floating-point data
サポート: 複素数Code generation for complex data
サポート: 絶対時間Code generation for model that includes blocks that depend on absolute or elapsed time
サポート: 連続時間Code generation for blocks that use continuous time
サポート: 可変サイズの信号Code generation for signals that vary in size

コード インターフェイス

リアルタイム モデル データ構造のエラー ステータス フィールドを削除Whether to log error status
ルートレベル I/O を以下として渡すHow generated code passes root-level input and output to reusable execution entry-point function
モデル クラスにモデル タイプを含めるWhether code generator places model type definitions in model class (R2020a 以降)

詳細設定パラメーター

インラインでない S-Function のサポートWhether to generate code for noninlined S-functions
マルチワード タイプの定義Whether to define multiword data types as system- or user-defined types (R2020a 以降)
モデルの初期化に動的メモリ割り当てを使用モデル データを初期化するために動的なメモリを割り当てるかどうか
終了関数が必要Whether to generate terminate entry-point function
信号と状態の構造の統合Whether to combine global block signal and state data into one structure
エントリポイント関数ごとに個別の内部データを生成Whether to place variables representing signals and states operated on at same rate in same data structure (R2021a 以降)
MAT ファイルの変数名の修飾子Prefix or suffix to add to MAT-file variable names
既存の共有コードFolder that contains shared code to use instead of generated shared utility code
関数 disable の削除関数 disable の到達不能インスタンスを生成コードから削除
関数 reset の削除Removal of unreachable instances of reset functions from generated code
カスタム ストレージ クラスを無視するWhether to apply predefined storage classes
テスト ポイント信号を無視Whether to allocate memory buffers for test points
各データ ストア ブロックを一意のアクセス ポイントとして実装Whether to generate unique variable for each read and write operation on Data Store Memory block
かっこのレベルParenthesization style for generated code
式のオペランドの順番を保持するPreserve order of operands in expressions
if ステートメント内の条件式を保持するPreserve empty primary conditions in if statements
if-elseif-else のパターンを switch-case ステートメントに変換するif-elseif-else ロジックのコードを switch-case ステートメントとして生成
関数の宣言で 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 (R2020a 以降)
インデント スタイルStyle for placement of braces
インデント サイズSize for indents in generated code
改行スタイルNewline character in generated code
最大ライン幅Maximum line width for wrapping generated code
タスク実行時間を計測するExecution-time profiling of generated code
関数の実行時間を計測するExecution-time profiling of functions in generated code
ワークスペース変数Workspace variable for execution-time measurements
保存オプションOptions for saving execution-time measurements
タスク スタック使用量の測定Stack usage profiling of generated code (R2022a 以降)
スタック ワークスペース変数Workspace variable for stack usage measurements (R2022a 以降)
サードパーティ ツールTool for code coverage analysis
移植可能なワード サイズを有効にするPortability across development computer and target processors
SIL でソースレベル デバッグを有効にするSIL シミュレーションまたは PIL シミュレーション中の生成コードのデバッグ
ブロックの作成SIL or PIL block creation
コード テンプレート: ソース ファイル (*.c) テンプレートソース コード ファイルのテンプレート
コード テンプレート: ヘッダー ファイル (*.h) テンプレート生成コードのヘッダーのテンプレート
データ テンプレート: ソース ファイル (*.c) テンプレートTemplate for generated data source file
データ テンプレート: ヘッダー ファイル (*.h) テンプレートTemplate for generated data header file
ファイル カスタマイズ テンプレートTemplate for custom file processing
メイン プログラム例の生成メイン プログラム例の生成を制御
ターゲット オペレーティング システム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
#include ファイルの区切り記号インクルード ファイルの区切り記号のタイプ
データ定義の配置にデータ オブジェクトからオーナーを使用する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
データ型置換Method for replacing built-in data type names in generated code (R2023a 以降)
カスタム データ型名を指定Option to replace built-in data type names in generated code
置換名: doubleName for double data type in generated code
置換名: singleName for single data type in generated code
置換名: int32Name for int32 data type in generated code
置換名: int16Name for int16 data type in generated code
置換名: int8Name for int8 data type in generated code
置換名: uint32Name for uint32 data type in generated code
置換名: uint16Name for uint16 data type in generated code
置換名: uint8Name for uint8 data type in generated code
置換名: booleanName for boolean data type in generated code
置換名: intName for int data type in generated code
置換名: uintName for uint data type in generated code
置換名: charName for char data type in generated code
置換名: uint64Name for uint64 data type in generated code
置換名: int64Name for int64 data type in generated code
OpenCV Mat クラスを使用してイメージを実装イメージを OpenCV Mat クラスとして表すオプション (R2021b 以降)
Coder の typedef 互換性Option to force generation of rtwtypes.h (R2023a 以降)

Classic Platform

スキーマ バージョンの XML ファイルの生成Generate AUTOSAR XML files for specified schema version
SHORT-NAME の最大長Maximum length for SHORT-NAME elements generated in XML files
AUTOSAR コンパイラの抽象化マクロの使用コンパイラの抽象化マクロの使用
1 次元配列を使用したルートレベルの行列の I/O のサポートUse one-dimensional C arrays to support root-level matrix I/O

Adaptive Platform

スキーマ バージョンの XML ファイルの生成Generate AUTOSAR XML files for specified schema version
SHORT-NAME の最大長Maximum length for SHORT-NAME elements generated in XML files
トランスポート層Transport layer used by XCP (R2020a 以降)
IP アドレスIP address of the machine on which the AUTOSAR adaptive application (XCP Server) executes (R2020a 以降)
ポートAUTOSAR Adaptive アプリケーション (XCP サーバー) が XCP クライアント コマンドを実行するネットワーク ポート (R2020a 以降)
詳細XCP サーバーに関する詳細メッセージを有効にします (R2020a 以降)
カスタム XCP サーバーの使用Use custom or default XCP Server (R2020a 以降)

オブジェクト

すべて展開する

rtw.codegenObjectives.Objectiveカスタム コード生成の目的

ブロック

すべて展開する

Custom MATLAB fileカスタム MATLAB コードを含むファイルを使用して親モデルのアクティブなコンフィギュレーション パラメーターを更新
ERT (optimized for fixed-point)ERT 固定小数点コード生成用に親モデルのアクティブなコンフィギュレーション パラメーターを更新
ERT (optimized for floating-point)ERT 浮動小数点コード生成用に親モデルのアクティブなコンフィギュレーション パラメーターを更新
GRT (debug for fixed/floating-point)GRT 固定小数点または浮動小数点コード生成用の親モデルのアクティブなコンフィギュレーション パラメーターの更新
GRT (optimized for fixed/floating-point)GRT 固定小数点または浮動小数点コード生成用の親モデルのアクティブなコンフィギュレーション パラメーターの更新

トピック

コード生成の構成

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