主要内容

HDL 测试平台生成

R2026b
生成测试平台,以基于 MATLAB® 或 Simulink® 的测试向量验证生成的 HDL 代码

生成 HDL 代码时,您可以选择生成 HDL 测试平台,以基于 Simulink 模型或 MATLAB 代码保存的测试向量验证生成的 HDL DUT。您还可以从生成的测试平台运行的测试收集代码覆盖率信息。有关如何选择和运行测试平台的详细信息,请参阅Generate Test Bench and Enable Code Coverage Using the HDL Workflow Advisor。

函数

makehdltbGenerate HDL test bench from model or subsystem

模型设置

全部展开

仿真工具Simulator to use to run generated test benches
HDL 代码覆盖率Enable HDL code coverage flags in generated simulator scripts
HDL 测试平台Enable HDL test bench generation
联合仿真模型Generate cosimulation model
SystemVerilog DPI 测试平台Enable SystemVerilog DPI test bench generation
测试平台名称后缀Suffix to append to test bench name
强制时钟Whether test bench forces clock input signals
时钟高电平时间(ns)Period during which test bench drives clock input signals high
时钟低电平时间(ns)Period during which test bench drives clock input signals low
保持时间(ns)Hold time for input signals and forced reset input signals
强制时钟使能Whether test bench forces clock enable input signals
时钟使能延迟(以时钟周期为单位)Elapsed time between deassertion of reset and assertion of clock enable
强制复位Whether test bench forces reset input signals
复位长度(以时钟周期为单位)Length of time during which reset is asserted
保持采样之间的输入数据Hold data values for subrate signals for number of base-rate clock cycles in subrate sample period
初始化测试平台输入Specify initial value driven on test bench inputs before data is asserted to DUT
多文件测试平台Divide generated test bench into helper functions, data, and HDL test bench code files
测试平台数据文件名后缀Suffix to append to test bench data file name when generating multi-file test bench
测试平台参考后缀Suffix to append to names of reference signals generated in test bench code
使用文件 I/O 读取/写入测试平台数据Create data files for reading and writing test bench input and output data
忽略输出数据检查(采样数)Number of samples during which output data checking is suppressed
浮点容差检查依据Check for errors in floating-point library based on relative or ULP errors
容差值Floating-point tolerance value
仿真库路径Path of compiled Altera or AMD simulation libraries

主题

验证基础知识

MATLAB 代码的 HDL 测试平台

Simulink 模型的 HDL 测试平台

疑难解答

Resolve Index Errors During HDL Simulation

Troubleshoot index errors during HDL code simulation.

精选示例