HLS Code Generation Basics
R2026bYou can generate High-Level Synthesis (HLS) code from MATLAB code by using the HDL Coder™ app. The HDL Workflow Advisor generates HLS code and synthesize the generated code by using the synthesis tools.
Tools
| Workflow Advisor | Generate synthesizable HLS code and test benches from MATLAB code (Since R2022a) |
Functions
codegen | Generate HDL or High-Level Synthesis (HLS) code from MATLAB code |
coder.config | Create HDL Coder code generation configuration objects |
hdlsetuphlstoolpath | Set up system environment to access High-Level Synthesis (HLS) software (Since R2022a) |
convertToHlsConfig | Convert coder.HdlConfig object to
coder.HlsConfig object (Since R2026b) |
mlhdlc_demo_setup | Copy demo example files to the current or specified directory (Since R2026b) |
Objects
coder.HlsConfig | HLS code generation configuration object configuration object (Since R2026b) |
Model Settings
Topics
- Workflows in HDL Workflow Advisor
Learn about the HDL Workflow Advisor workflows and the platforms you can target.
- Specify Properties of Entry-Point Function Inputs
Specify input types so that the code generator can determine the types of all variables.
- HLS Code Generation Report
High-Level Synthesis (HLS) code generation report.
- Call Custom HLS Code from the Generated HLS Code
Integrate C/C++ code with MATLAB code intended for code generation.
- Replace MATLAB Functions with Custom Code for HLS Code Generation
Replace MATLAB functions with custom C/C++ implementations during HLS code generation by using a Code Replacement Library. (Since R2026b)
- Array Layouts for HLS Code Generation
Generate HLS code in row-major or column-major array layouts.
- Generate Code for Global Variables
Generate C/C++ code from MATLAB code that uses global data.

