DPI Generation for MATLAB Code
To generate a DPI component from a MATLAB function, see Considerations for DPI Component Generation with MATLAB.
To use this functionality, download and install the ASIC Testbench for HDL Verifier add-on. This feature also requires MATLAB Coder™.
Not all DPI generation functionalities are available in MATLAB Online™.
Functions
| dpigen | Generate UVM or SystemVerilog DPI component from MATLAB function | 
Objects
| svdpiConfiguration | Configure workflows for UVM and SystemVerilog component generation from MATLAB (Since R2023a) | 
Topics
- Generate DPI Component Using MATLABThis topic guides you through the workflow for creating a SystemVerilog DPI component from a MATLAB function. 
- Considerations for DPI Component Generation with MATLABYou can export a MATLAB function as a component with a direct programming interface (DPI) for use in a SystemVerilog simulation. 
- Use Generated DPI Functions in SystemVerilogHow to export the generated DPI component to a SystemVerilog environment. 
- Use Variable-Sized Vector in SystemVerilog DPI ComponentThis example shows how to configure, generate, and use a SystemVerilog DPI (SVDPI) component with variable-length inputs or outputs. 
- SystemVerilog and UVM TemplatesGenerate customizable SystemVerilog modules and UVM components from MATLAB using templates. 
- Custom Template Language SyntaxTemplate variable definition and usage. 

