SystemVerilog DPI test bench - Enable or disable SystemVerilog DPI test bench generation - MATLAB (original) (raw)

Main Content

Enable or disable SystemVerilog DPI test bench generation

Model Configuration Pane: HDL Code Generation / Test Bench

Description

The SystemVerilog DPI test bench parameter enables or disables generation of SystemVerilog DPI test bench. Select your HDL simulator by using the**Simulation tool** configuration parameter. The Custom setting for Simulation tool is not supported for test bench generation.

When you set this property, the code generator generates a direct programming interface (DPI) component for your entire Simulink® model, including your DUT and data sources. Your entire model must support C code generation with Simulink Coder™. The code generator generates a SystemVerilog test bench that compares the output of the DPI component with the output of the HDL implementation of your DUT. The code generator also builds shared libraries and generates a simulation script for the simulator you select.

Consider using this option if the default HDL test bench takes a long time to generate or simulate. Generation of a DPI test bench is sometimes faster than the default version because it does not run a full Simulink simulation to create the test bench data. Simulation of a DPI test bench with a large data set is faster than the default version because it does not store the input or expected data in a separate file.

To use this capability, you must have HDL Verifier™ and Simulink Coder. To run the SystemVerilog test bench with the generated VHDL code, you must have a mixed-language simulation license for your HDL simulator.

Settings

off (default) | on

off

Disable generation of SystemVerilog DPI test bench.

on

Enable generation of SystemVerilog DPI test bench.

Tips

To set this property, use the functions hdlset_param or makehdltb. To view the property value, use the function hdlget_param.

For example, to set this property for a subsystem named symmetric_fir in a model named sfir_fixed, use one of these methods:

Programmatic Use

Parameter: GenerateSVDPITestBench
Type: character vector
Value: "None" | "ModelSim" "Incisive" "VCS" "Vivado Simulator"
Default: "ModelSim"

Limitations

Your DUT subsystem must meet the following conditions:

Version History

Introduced in R2017a