Main Content

User-DefinedMATLABFunctions

Create HDL-ready algorithms using blocks in User-Defined Functions library

The HDL Coder block library contains many blocks that you can add to your develop your Simulink®modeling environment and develop your HDL algorithm. You can also integrate your HDL algorithm that contains MATLAB®code in the Simulink environment by using theMATLAB FunctionandMATLAB Systemblocks in the User-Defined Functions library.

To filter the Simulink Library Browser to show only HDL-supported blocks, enterhdllib.

Functions

expand all

hdl.RAM Single, simple dual, or dual-port RAM for memory read/write access
hdl.BlackBox Black box for including custom HDL code
hdllib Display blocks that are compatible with HDL code generation
hdl.treesum Sum of array elements using tree architecture
hdl.treeprod Product of array elements using tree architecture

Topics

Modeling MATLAB Functions

Generate HDL Code from MATLAB Functions

Related Information

Troubleshooting

Initialize Persistent Variables in MATLAB Functions

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