MATLAB Classes
HLS code generation for MATLAB® classes
You can generate code for MATLAB classes, including value classes, handle classes, and System object™. Your class can have multiple methods and properties and can inherit from multiple classes. MATLAB classes are converted to C++ classes in the generated HLS code.
Topics
Code Generation Basics
- Generate HLS Code for MATLAB Value Classes
Use a value class in MATLAB code intended for HLS code generation. - Generate HLS Code for MATLAB Handle Classes and System Objects
Use a System object in MATLAB code intended for code generation. - Generate C++ Classes in HLS code for MATLAB Classes
Generate a C++ class in HLS code for MATLAB classes.
Usage Notes and Limitations
- MATLAB Classes Definition for Code Generation
Use classes in MATLAB code intended for code generation. - Considerations for Generating HLS Code from System Objects
Special considerations for using System object in code generated from MATLAB. - Code Generation for Handle Class Destructors
Use a handle class destructor in MATLAB code intended for code generation.
Troubleshooting
Handle Object Limitations for Code Generation
Adhere to code generation restrictions for handle objects.
Troubleshoot issues with assignment of a property of a handle class.
Passing by Reference Not Supported for Some Properties
You cannot use certain properties with coder.ref, coder.rref, or coder.wref.
Work Around Language Limitation: Code Generation Does Not Support Object Arrays
Troubleshoot code generation failure for arrays of objects in your MATLAB code.