主要内容

用户定义的 MATLAB 函数

使用 User-Defined Functions 库中的模块创建支持 HDL 的算法

HDL Coder 模块库包含许多模块,您可将这些模块添加到 Simulink® 建模环境并开发您的 HDL 算法。您还可通过使用 User-Defined Functions 库中的 MATLAB FunctionMATLAB System 模块,将包含 MATLAB® 代码的 HDL 算法集成到 Simulink 环境中。

要过滤 Simulink 库浏览器以仅显示 HDL 支持的模块,请输入 hdllib

函数

全部展开

hdl.RAMSingle, simple dual, dual, true dual, or simple tri-port RAM for memory read/write access
hdl.BlackBoxBlack box for including custom HDL code
hdllib显示与 HDL 代码生成兼容的模块
hdl.treesumSum of array elements using tree architecture (自 R2022a 起)
hdl.treeprodProduct of array elements using tree architecture (自 R2022a 起)

主题

MATLAB 函数建模

从 MATLAB 函数生成 HDL 代码

疑难解答

Initialize Persistent Variables in MATLAB Functions

Specialized semantics impact the way that a function initializes persistent data.

精选示例