从 MATLAB 算法生成代码
R2026b通过生成 HDL 代码并将代码部署在专用集成电路 (ASIC) 或现场可编程门阵列 (FPGA) 上,在硬件中实现 MATLAB 算法。使用与 HDL 代码生成兼容的语法和函数编写 MATLAB 算法。如果算法使用浮点数据,HDL Coder™ 可助您将其转换为定点算法。应用优化以生成更加硬件高效的 HDL 代码。在生成 HDL 代码并验证它与原始算法匹配后,将 HDL 代码部署至目标硬件。
函数
对象
coder.HdlConfig | HDL codegen configuration object |
工具
| 工作流顾问 | Generate synthesizable HDL code and test benches from MATLAB code |
主题
- Edit Configuration Parameters for HDL Coder
Edit HDL Coder configuration object parameters interactively.
- Programmatically Generate, Verify, and Synthesize HDL Code from MATLAB Code
This example shows how to programmatically perform floating-point to fixed-point conversion, generate HDL code, verify the generated HDL code with an HDL test bench, and synthesize the generated HDL code by using the command-line interface.
- Generate Instantiable Code for Functions
You can use the Generate instantiable code for functions option to generate a VHDL®
entity, or Verilog® or SystemVerilogmodulefor each function. - Generate Modular HDL and HLS Code from an LMS Filter Algorithm
This example shows how to generate modular HDL and HLS code from a MATLAB design that implements an adaptive noise canceler using a Least Mean Square (LMS) filter.
- Generation of Clock Bundle Signals in HDL Coder
How HDL Coder generates clock, reset, and clock enable signals in the HDL code.


