HDL Test Bench Generation
R2026bGenerate a test bench that verifies generated HDL code against test vectors
from MATLAB® or Simulink®
When you generate HDL code, you can optionally generate an HDL test bench that verifies the generated HDL DUT against test vectors saved from your Simulink model or from the MATLAB code. You can also collect code coverage information from the tests run by the generated test bench. For more information on how to select and run a test bench, see Generate Test Bench and Enable Code Coverage Using the HDL Workflow Advisor.
Functions
makehdltb | Generate HDL test bench from model or subsystem |
Model Settings
Topics
Verification Basics
- Choose a Test Bench for Generated HDL Code
Select a generated test bench. - Generated Model and Validation Model
The generated model is a model created during HDL code generation that shows the HDL implementation architecture and includes latency.
HDL Test Bench for MATLAB Code
- Verify Code with HDL Test Bench
Simulate the generated HDL design under test (DUT) with test vectors from the test bench using the specified simulation tool. - Using Test Benches With HDL and HLS Code Generation
MATLAB test bench requirements and best practices for HDL and High-Level Synthesis (HLS) code generation. - Test Bench Generation
HDL Coder™ writes the DUT stimulus and reference data from your MATLAB or Simulink simulation to data files (.dat). - Specify Test Bench Clock Enable Toggle Rate
Specify test bench clock enable toggle rate.
HDL Test Bench for Simulink Model
- Verify Generated HDL Code from Simulink Model
Generate an HDL test bench to verify the VHDL® or Verilog® Code. - Verify Generated Code Using HDL Test Bench at Command Line
Learn how to generate an HDL test bench to verify the VHDL, Verilog or SystemVerilog Code. - Test Bench Generation
Learn how HDL test bench generation works. - Generate Test Bench and Enable Code Coverage Using the HDL Workflow Advisor
Generate test bench and code coverage for generated HDL code using the HDL Workflow Advisor. - Test Bench Block Restrictions
Determine which blocks do not support direct connection to the DUT for test bench generation.
Troubleshooting
Resolve Index Errors During HDL Simulation
Troubleshoot index errors during HDL code simulation.
