SystemVerilog DPI Component Generation
Export Simulink Subsystem or MATLAB Function Using DPI Interface
You can export a Simulink® subsystem or MATLAB® function with a DPI interface for Verilog® or SystemVerilog simulation. The coder wraps generated C code with a DPI wrapper accessed through a SystemVerilog thin interface function.
Simulink subsystem — Access this feature by clicking the HDL Verifier app, and then in the HDL Verifier tab click Generate DPI Component. See Generate SystemVerilog DPI Component.
MATLAB function — Generate the component using the
dpigen
function. See Generate DPI Component Using MATLAB.
HDL Verifier™ supports SystemVerilog DPI component generation with these products and platforms.
Design Format | Required Products | Recommended Products | Supported Platforms |
---|---|---|---|
Simulink subsystem | Simulink and Simulink Coder™ | Embedded Coder® |
|
MATLAB function | MATLAB and MATLAB Coder |
|
Generate SystemVerilog DPI Testbench in HDL Coder
If you have an HDL Coder™ license, you can generate a SystemVerilog DPI testbench. Use the
testbench to verify your generated HDL code using C code generated from your entire
Simulink model, including the DUT and data sources. To use this feature, your
entire model must support C code generation with Simulink
Coder. You can access this feature in HDL Workflow Advisor under
HDL Code Generation > Set Testbench
Options, or in the Model Configuration Parameters dialog box, under
HDL Code Generation>Test Bench.
Alternatively, for command-line access, set the
GenerateSVDPITestBench
property of makehdltb
(HDL Coder). For an example of
SystemVerilog Testbench generation using HDL Coder, see Verify HDL Design Using SystemVerilog DPI Test Bench (HDL Coder).
HDL Verifier supports SystemVerilog DPI testbench generation in HDL Coder with these products and platforms.
Design Format | Required Products | Recommended Products | Supported Platforms |
---|---|---|---|
Simulink subsystem | Simulink and Simulink Coder | Embedded Coder |
|