이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
생성 코드에서의 데이터 표현
외부 코드와의 통합을 용이하게 하고 상호 작용 및 계측을 지원하기 위해 데이터 표현을 사용자 지정
모델에서 생성하는 신호, 상태 및 블록 파라미터는 생성 코드에 변수로 나타납니다. 코드가 이들 변수를 선언하고 정의하는 방식을 제어하십시오.
메모리 사용량을 줄이고 숫자 데이터형을 지정하여 효율적인 코드를 생성합니다. 데이터형의 명명, 정의 및 사용을 제어합니다.
식별자와 선언 및 정의의 파일 배치를 지정하여 생성된 코드를 사용자 코드와 쉽게 통합할 수 있습니다.
신호 데이터에 대한 액세스를 관리하고 파라미터 조정 가능성을 지정합니다.
신호 및 파라미터 데이터를 구조체에 패키징합니다.
코드 가독성과 추적성을 향상시킵니다.
도움말 항목
생성 코드에서의 스토리지
- How Generated Code Stores Internal Signal, State, and Parameter Data
To calculate output data from input data, the generated code must store some internal data in memory, such as block state data and nonscalar parameter data. - Data Structures in the Generated Code
The code generator uses data structures in the generated code to describe the model fully and store data, such as signal and states. - Data Stores in Generated Code
Use a data store to explicitly model a piece of shared global data in the generated code. - Parameter Data Types in the Generated Code
Optimize the generated code and generate code for specific processors by controlling the data types that store parameter data in computer memory. - Generate Local Variables with Localizable Storage Class
For signals, if possible, generate variables that are local to functions rather than in global storage. - Share Data Between Code Generated from Simulink, Stateflow, and MATLAB
Define data shared between Simulink, Stateflow, and MATLAB. - Air-Fuel Ratio Control System with Fixed-Point Data
Optimize the code generated for an air-fuel ratio control system by using fixed-point data types. - Finely Control Data Representation by Writing TLC Code for a Storage Class
For advanced control of data representation in the generated code, create custom storage classes by writing TLC code.
배열 레이아웃
- Code Generation of Matrices and Arrays
Work with code that the code generator produces for matrices and arrays. - Generate Row-Major Code for S-Functions
Enable existing S-functions for row-major code generation by specifying the array layout. - Generate Row-Major Code for Model That Contains a MATLAB Function Block
Usecoder.rowMajorinside the MATLAB Function block to generate row-major code. - Column-Major Layout to Row-Major Layout Conversion of Models with Lookup Table Blocks
Convert existing column-major model to row-major for code generation. - Row-Major Algorithms for Row-Major Array Layout
Generate code by using the row-major and column-major algorithms for row-major array layout. - Interpolation Algorithm for Row-Major Array Layout
Simulate and generate code by using the interpolation algorithm for row-major and column-major array layout. - Interpolation with Subtable Selection Algorithm for Row-Major Array Layout
Simulate and generate code by using the interpolation with subtable selection algorithm for row-major and column-major array layout. - Direct Lookup Table Algorithm for Row-Major Array Layout
Simulate and generate code by using the Direct Lookup Table algorithm for row-major and column-major array layout. - Dimension Preservation of Multidimensional Arrays
Preserve dimensions of multidimensional arrays in generated code. - Preserve Dimensions of Multidimensional Arrays in Generated Code
Preserve array dimensions for model data elements. - Preserve Dimensions of Bus Elements in Generated Code
Preserve array dimensions for bus elements.
가변 크기 데이터
- Variable-Size Signals in Generated Code
Memory allocation for variable-size signals and variable-size arrays in MATLAB Function blocks. - Use Dynamic Memory Allocation for Unbounded Variable-Size Signals in C++ Code Generation
Generate C++ code that uses dynamic memory allocation for unbounded variable-size signals. - Generate C++ Code for Export-Function Models That Process Unbounded Variable-Size Data
Generate C++ code from an export-function model that processes unbounded variable-size data and integrate the generated code with custom code.
명명된 데이터형과 사용자 지정 데이터형
- Manage Replacement of Simulink Data Types in Generated Code
Control the names of primitive, structure, and enumerated data types in the generated code. - Organize Data into Structures in Generated Code
Create structures of signal, state, and parameter data in the generated code. - Use Enumerated Data in Generated Code
Enumerated data is data that is restricted to a finite set of values. Create enumerations in the generated code. - Control File Placement of Custom Data Types
Integrate the generated code with your own code by placingtypedefstatements in generated and imported files. - Specify Boolean and Data Type Limit Identifiers
Integrate the generated code with your code by specifying the identifiers that correspond to Booleanfalseandtrue. Also, specify the identifiers that correspond to data type limits, which the generated code uses to determine overflows.
