주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

코드 생성 구성 세트

시뮬레이션 및 코드 생성을 위한 모델 구성

코드 생성을 위한 모델 구성 파라미터는 코드 생성기가 코드를 생성하고 모델에서 실행 파일을 빌드하는 방법을 정의합니다.

모델 설정

모두 확장

공유 코더 사전Embedded Coder 코드 생성을 위한 코드 인터페이스 구성을 포함하는 사전 (R2022b 이후)
우선 순위가 지정된 목표Prioritized list of Code Generation Advisor objectives to apply for reviewing model configuration parameter settings

데이터 초기화

루트 수준 I/O 영(0) 초기화 제거Control generation of initialization code for root-level inports and outports set to zero
내부 데이터 영(0) 초기화 제거Control generation of Initialization code for internal work structures, such as block states and block outputs, to zero

최적화 수준

LevelOptimization level for generated code
우선 순위Control application of optimizations based on priority
사용자 지정 최적화 지정개별 최적화 파라미터를 선택할 수 있는 옵션을 활성화합니다.
배열 인덱싱 단순화Replace multiply operations in array indices when accessing arrays in a loop
병렬 for 루프 생성병렬 for-루프에 대한 최적화
for 루프 자동 스케줄링생성된 중첩 루프 코드를 자동으로 스케줄링 (R2024a 이후)
부울 데이터를 비트 필드로 패킹부울 신호의 저장 제어
다른 크기와 차원의 버퍼 재사용버퍼를 재사용하여 크기와 차원이 서로 다른 데이터를 저장합니다
전역 데이터 액세스 최적화전역 변수 사용 최적화
생성 코드의 블록 작업 순서 최적화Specify to reorder block operations for improved code execution speed
전역 블록 출력 재사용Optimization to reuse global variables
Model 블록의 출력 버퍼 재사용Reuse referenced model buffers if possible (R2022b 이후)
C restrict 한정자 사용Insert C restrict keyword for function arguments (R2026a 이후)
버퍼 재사용 후보 통합Analyze buffer reuse candidates to implement efficient reuses (R2025a 이후)
Assignment 및 Bus Assignment 블록에 대해 인 플레이스(in-place) 업데이트 수행Bus Assignment 및 Assignment 블록의 입력 및 출력 변수를 재사용합니다.
Data Store Read 및 Data Store Write 블록에 대해 버퍼 재사용Eliminate temporary buffers for Data Store Read and Data Store Write blocks
비트 필드 선언자 유형 지정자비트필드 유형 지정
재사용 가능한 서브시스템 출력을 다음으로 전달재사용 가능한 서브시스템이 출력을 전달하는 방식을 제어합니다

고급 파라미터

Optimize using the specified minimum and maximum valuesOptimize using minimum and maximum values for signals and parameters
Remove Code from Tunable Parameter Expressions That Saturate Out-of-Range ValuesControl 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
지역 변수를 0 값으로 초기화하는 설정 제거0으로 설정된 지역 변수에 대한 초기화 코드 생성을 제어 (R2023b 이후)
Halide 코드 생성Generate Halide code for faster array computation (R2023b 이후)
코드-모델Include hyperlinks in the code generation report that link to the model diagram
모델-코드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
모델 웹 뷰 생성코드 생성 리포트에 모델 웹 뷰 포함
정적 코드 메트릭정적 코드 메트릭 리포트 생성
모델 추적에 사용할 주석 형식주석 형식 지정
연산자 주석Include operator annotations for Polyspace in generated comments
Simulink 블록 설명코드 생성 과정에서 블록에 대한 설명을 주석으로 삽입
Simulink 데이터 객체 설명Include descriptions of Simulink data objects as comments in generated code
블록 주석에 연결되는 주석연결된 주석(annotation)을 생성된 코드의 사용자 지정 주석(comment)으로 포함 (R2024b 이후)
사용자 지정 주석(MPT 객체만 해당)생성된 코드에 MPT 신호 및 파라미터 데이터에 대한 주석을 포함
사용자 지정 주석 함수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 블록 주석(annotation)에 대한 코드 주석(comment) 포함
주석 스타일코드 생성 시의 주석 스타일 지정

자동 생성된 식별자 명명 규칙

전역 변수생성된 전역 변수 식별자 사용자 지정
전역 유형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
상수 매크로Customize generated constant macro identifiers
최소 변형 길이이름 변형(mangling)에 사용되는 최소 문자 수를 지정합니다.
시스템 생성 식별자Specify whether to use shorter names for the $N token in system-generated identifiers
Generate scalar inlined parameter asExpress 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
공유 유틸리티 식별자 형식공유 유틸리티 식별자 사용자 지정
사용자 지정 토큰 텍스트$U 토큰으로 삽입할 텍스트 지정
신호 명명생성된 코드에서 Simulink.Signalmpt.Signal 객체의 명명 규칙을 지정합니다.
M-functionSpecify rules for naming identifiers in generated code
#define 명명생성된 코드에서의 #define 파라미터 명명 규칙 지정
M-functionSpecify rule for naming identifiers in generated code
파라미터 명명생성된 코드에서 Simulink.Parametermpt.Parameter 객체의 명명 규칙을 지정합니다.
M-functionSpecify rules for naming identifiers in generated code

소프트웨어 환경

코드 대체 라이브러리Libraries that define code optimizations for specific target environment
Support: floating-point numbersCode generation for floating-point data
Support: complex numbers복잡한 데이터에 대한 코드 생성
Support: absolute time절대 시간 또는 경과 시간에 의존하는 블록을 포함하는 모델에 대한 코드 생성
Support: continuous timeCode generation for blocks that use continuous time
Support: variable-size signals크기가 다양한 신호에 대한 코드 생성

코드 인터페이스

실시간 모델 데이터 구조체에서 오류 상태 필드 제거오류 상태를 기록할지 여부
생성 코드에서 MATLAB 네임스페이스 유지Specify whether generated code for enumeration in MATLAB namespace includes the namespace in the type definition (R2025a 이후)
루트 수준 I/O 전달 형식코드 생성의 결과로 생성된 코드가 루트 레벨의 입출력을 재사용 가능한 실행 진입점 함수로 어떻게 전달하는지 명시하십시오.
루트 수준 I/O를 다음으로 구현Specify how generated code passes root-level input and output to nonreusable subcomponent execution entry-point function (R2025a 이후)
모델 클래스에 모델 유형 포함Whether code generator places model type definitions in model class

고급 파라미터

인라인이 아닌 S-Function 지원인라인 처리되지 않은 S-Function에 대한 코드 생성 여부
멀티워드 유형 정의Whether to define multiword data types as system- or user-defined types
모델 초기화에 동적 메모리 할당 사용모델 데이터 초기화를 위해 동적 메모리를 할당할지 여부
종료 함수 필요함진입점 함수를 생성할지 종료할지 여부
신호/상태 구조체 결합전역 블록 신호 및 상태 데이터를 하나의 구조체로 통합할지 여부
진입점 함수별로 별개의 내부 데이터 생성Whether to place variables representing signals and states operated on at same rate in same data structure
MAT 파일 변수 이름 수정자Prefix or suffix to add to MAT-file variable names
기존 공유 코드생성된 공유 유틸리티 코드 대신 사용할 공유 코드가 포함된 폴더
비활성화 함수 제거Removal of unreachable instances of disable functions from generated code
재설정 함수 제거Removal of unreachable instances of reset functions from generated code
사용자 지정 스토리지 클래스 무시Whether to apply predefined storage classes
테스트 지점 신호 무시테스트 지점에 대해 메모리 버퍼를 할당할지 여부
각 Data Store 블록을 고유한 액세스 지점으로 구현Whether to generate unique variable for each read and write operation on Data Store Memory block
괄호 수준Parenthesization style for generated code
표현식의 피연산자 순서 유지식에서 피연산자의 순서를 유지합니다
if 문의 조건식 유지Preserve empty primary conditions in if statements
if-elseif-else 패턴을 switch-case 문으로 변환if-elseif-else 논리를 switch-case 문으로 변환하는 코드 생성
함수 선언에 extern 키워드 유지함수 선언에 extern 키워드를 포함
함수 선언에 정적 키워드 유지함수 선언에 static 키워드를 포함
도달할 수 없는 경우 switch 문에 대한 default case의 코드 생성 차단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
형변환 모드변수의 데이터형을 형변환하는 방법
정적 배열 컨테이너 유형Container type for static arrays
동적 배열 컨테이너 데이터형Container type for dynamic arrays (R2024b 이후)
들여쓰기 스타일Style for placement of braces
들여쓰기 크기생성된 코드의 들여쓰기 크기
새 줄 스타일생성된 코드 내의 줄바꿈 문자
최대 라인 너비Maximum line width for wrapping generated code
태스크 실행 시간 측정생성된 코드의 실행 시 프로파일링
함수 실행 시간 측정생성된 코드 내 함수의 실행 시 프로파일
작업 공간 변수실행 시간 측정을 위한 작업 공간 변수
저장 옵션실행 시간 측정값 저장 옵션
태스크 스택 사용량 측정Stack usage profiling of generated code (R2022a 이후)
스택 작업 공간 변수Workspace variable for stack usage measurements (R2022a 이후)
타사 툴Tool for code coverage analysis
이식 가능한 워드 크기 사용개발 컴퓨터와 타깃 프로세서 간 이식성
SIL에 대한 소스 수준 디버그 활성화SIL 또는 PIL 시뮬레이션 중에 생성 코드 디버그
블록 생성SIL or PIL block creation
코드 템플릿: 소스 파일 (*.c) 템플릿 소스 코드 파일 템플릿
코드 템플릿: 헤더 파일 (*.h) 템플릿 생성된 코드 헤더용 템플릿
Data 템플릿: 소스 파일 (*.c) 템플릿 Template for generated data source file
Data 템플릿: 헤더 파일 (*.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
사용자 지정 파일 배너 사용코드 및 데이터 템플릿에 대한 구성 사용 여부 제어
데이터 정의전역 변수 정의의 배치
데이터 정의 파일 이름File to contain data definitions
데이터 선언데이터 선언 위치
데이터 선언 파일 이름File to contain deta declarations
#include 파일 구분 기호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
파일 패키징 형식생성된 코드 파일에 대한 파일 패키징 방법
헤더 파일헤더 파일의 사용자 지정 이름
소스 파일Custom name for source files
데이터 파일Custom name for data files
Rate Transition 블록 코드Format for rate transition block code and data

유형 교체 및 이름

데이터형 대체생성된 코드 내의 내장 데이터형 이름을 대체하는 방법 (R2023a 이후)
사용자 지정 데이터형 이름 지정Option to replace built-in data type names in generated code
Replacement Name: doubleName for double data type in generated code
Replacement Name: singleName for single data type in generated code
Replacement Name: int32Name for int32 data type in generated code
Replacement Name: int16Name for int16 data type in generated code
Replacement Name: int8Name for int8 data type in generated code
Replacement Name: uint32Name for uint32 data type in generated code
Replacement Name: uint16Name for uint16 data type in generated code
Replacement Name: uint8Name for uint8 data type in generated code
Replacement Name: booleanName for boolean data type in generated code
Replacement Name: intName for int data type in generated code
Replacement Name: uintName for uint data type in generated code
Replacement Name: charName for char data type in generated code
Replacement Name: uint64Name for uint64 data type in generated code
Replacement Name: int64Name for int64 data type in generated code

고급 파라미터

부울 false 식별자Identifier for Boolean false
부울 true 식별자Identifier for Boolean true
64비트 정수 최대 식별자Identifier for 64-bit integer maximum
16비트 정수 최대 식별자Identifier for 16-bit integer maximum
32비트 정수 최대 식별자Identifier for 32-bit integer maximum
8비트 정수 최대 식별자Identifier for 8-bit integer maximum
64비트 부호 없는 정수 최대 식별자Identifier for 64-bit unsigned integer maximum
16비트 부호 없는 정수 최대 식별자Identifier for 16-bit unsigned integer maximum
32비트 부호 없는 정수 최대 식별자Identifier for 32-bit unsigned integer maximum
8비트 부호 없는 정수 최대 식별자Identifier for 8-bit unsigned integer maximum
64비트 정수 최소 식별자Identifier for 64-bit integer minimum
16비트 정수 최소 식별자Identifier for 16-bit integer minimum
32비트 정수 최소 식별자Identifier for 32-bit integer minimum
8비트 정수 최소 식별자Identifier for 8-bit integer minimum
유형 제한 식별자 대체 헤더 파일Header file that defines Boolean and data type limit identifiers
Coder typedef 호환성rtwtypes.h 파일 생성을 강제하는 옵션 (R2023a 이후)
OpenCV Mat 클래스를 사용하여 이미지 구현Option to represent images as OpenCV Mat class (R2021b 이후)

클래식 플랫폼

스키마 버전에 맞는 XML 파일 생성Generate AUTOSAR Classic XML files for specified schema version
최대 SHORT-NAME 길이XML 파일에서 생성되는 SHORT-NAME 요소의 최대 길이
AUTOSAR 컴파일러 추상화 매크로 사용컴파일러 추상화 매크로 사용
1차원 배열을 사용하여 루트 수준 행렬 I/O 지원Use one-dimensional C arrays to support root-level matrix I/O

적응형 플랫폼

스키마 버전에 맞는 XML 파일 생성Generate AUTOSAR Adaptive XML files for specified schema version
최대 SHORT-NAME 길이Maximum length for SHORT-NAME elements generated in XML files
전송 계층XCP에서 사용하는 전송 계층
IP 주소IP address of the machine on which the AUTOSAR adaptive application (XCP Server) executes
포트AUTOSAR 적응형 애플리케이션(XCP 서버)이 XCP 클라이언트 명령을 처리하는 네트워크 포트
세부 정보 표시Enable verbose messages for XCP Server
사용자 지정 XCP 서버 사용Use custom or default XCP Server

객체

모두 확장

rtw.codegenObjectives.ObjectiveCustom code generation objective

블록

모두 확장

Custom MATLAB fileUpdate active configuration parameters of parent model by using file containing custom MATLAB code
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

도움말 항목

코드 생성 구성

모델 구성 파라미터: 코드 생성

추천 예제