Best Practice Guide for SystemVerilog DPI Generation

Guide for learning how to efficiently generate SystemVerilog DPI-C components from MATLAB code for HDL simulators
24 Downloads
Updated 20 Nov 2024
Best Practice Guide for SystemVerilog DPI Component Generation
HDL Verifier™ facilitates the generation of SystemVerilog DPI and Universal Verification Methodology (UVM) testbench components directly from MATLAB® or Simulink®, bridging the gap between algorithm development and design verification. This guide is tailored to enhance your MATLAB workflow by providing recommended practices for preparing MATLAB designs for SystemVerilog DPI component generation.
In this guide, you will find comprehensive coverage of topics essential for evaluating MATLAB code compatibility with code generation, including:
  • Getting started with code generation
  • Converting scripts to functions
  • Frame/stream modeling
  • Working with vectors and matrices, including variable-sized vectors and matrices
  • Using floating- and fixed-point data types
  • Considerations for constrained randomization
  • Generating UVM components

Cite As

MathWorks HDLVerifier Team (2025). Best Practice Guide for SystemVerilog DPI Generation (https://github.com/mathworks/Best-Practice-Guide-for-SystemVerilog-DPI-Component-Generation/releases/tag/1.0.0), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with R2023b to R2024a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

examples/1_3_convert_script_to_function

examples/2_3_frame_to_stream

examples/2_5_variable_sized_vectors_matrices

examples/3_1_generate_SVDPI_with_MEX

examples/3_3_parameterize_generated_code/function_folder

examples/3_3_parameterize_generated_code/scripts

examples/3_3_parameterize_generated_code/workdir

examples/1_3_convert_script_to_function

examples/2_3_frame_to_stream

examples/2_5_variable_sized_vectors_matrices

examples/3_1_generate_SVDPI_with_MEX

Version Published Release Notes
1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.