Main Content

HDL Coder

Generate HDL and High-Level Synthesis (HLS) code from MATLAB code


The HDL Coder app generates synthesizable HDL code and HLS code from MATLAB® code that is supported for hardware. You can generate VHDL, Verilog, SystemVerilog, or HLS code that you can integrate into existing HDL applications outside of MATLAB.

The workflow-based user interface steps you through the code generation process. Using the app, you can:

  • Create a project or open an existing HDL Coder™ project.

  • Specify the MATLAB function and the MATLAB testbench for your project.

  • Select the code generation workflow as MATLAB to HDL or MATLAB to HLS.

  • Propose input data types or autodefine data types by specifying the MATLAB testbench file.

  • Convert floating-point MATLAB code to fixed-point HDL code or HLS code.

  • Specify the target device and synthesis tool to deploy the generated HDL or HLS code on the target hardware.

  • Access generated files and view code generation reports.

  • Verify the numerical behavior of generated HDL code with HDL test bench, cosimulation, or FPGA-in-the loop.

  • Verify the numerical behavior of generated HLS code with HDL test bench.

  • Synthesize, and place and route the generated HDL code for the specified hardware with the Generic ASIC/FPGA workflow.

  • Integrate your generated HDL IP core with the embedded processor by using IP Core Generation workflow.

  • Generate a programming file and download it to the target device.

HDL Coder app

Open the HDL Coder App

  • MATLAB Toolstrip: On the Apps tab, under Code Generation, click the HDL Coder app icon.

  • MATLAB command prompt: Enter hdlcoder.


HDL Coder app is not available in MATLAB Online™.

Programmatic Use

expand all

hdlcoder opens the HDL Coder app.

Version History

Introduced in R2012a