VHDLTest is a .NET command-line tool that runs VHDL test benches and generates standard test results files. It supports multiple VHDL simulators including GHDL, ModelSim, QuestaSim, Active-HDL, NVC, and Vivado Simulator. The tool is designed for use in regulated industries that require evidence of tool validation.
- Runs VHDL test benches via a simple YAML configuration file
- Generates standard
.trxor JUnit XML test results files compatible with CI/CD pipelines - Supports GHDL, ModelSim,
QuestaSim,
Active-HDL,
NVC,
Vivado Simulator, and a built-in
mocksimulator for self-validation - Configurable simulator paths via environment variables
- Built-in self-validation mode for tool qualification evidence in regulated industries
Requires .NET SDK 8.0 or later.
Add VHDLTest to a .NET tool manifest file:
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local DEMAConsulting.VHDLTest
The tool can then be executed by:
dotnet vhdltest <arguments>
Create a YAML configuration file specifying the VHDL source files and test benches to run:
# List of VHDL source files
files:
- full_adder.vhd
- full_adder_pass_tb.vhd
- full_adder_fail_tb.vhd
# List of test benches to execute
tests:
- full_adder_pass_tb
- full_adder_fail_tb
Run VHDLTest with the configuration file:
dotnet vhdltest --config test_suite.yaml
Generate a test results file for CI environments:
dotnet vhdltest --config test_suite.yaml --results test_results.trx
To generate a JUnit XML test results file instead, use a .xml extension:
dotnet vhdltest --config test_suite.yaml --results test_results.xml
Full command-line options:
Usage: VHDLTest [options] [tests]
Options:
-h, -?, --help Display help
-v, --version Display version
--silent Silence console output
--verbose Verbose output
--validate Perform self-validation
--depth <n> Validation report depth (default: 1)
-l, --log <log.txt> Log output to file
-c, --config <config.yaml> Specify configuration
-r, --result, --results <out.trx|out.xml> Specify test results file (.trx or JUnit XML)
-s, --simulator <name> Specify simulator
-0, --exit-0 Exit with code 0 if tests fail
-- End of options
Before running tests, configure simulator paths via environment variables if needed:
VHDLTEST_GHDL_PATH— path to GHDL folderVHDLTEST_MODELSIM_PATH— path to ModelSim folderVHDLTEST_QUESTASIM_PATH— path to QuestaSim folderVHDLTEST_VIVADO_PATH— path to Vivado folderVHDLTEST_ACTIVEHDL_PATH— path to Active-HDL folderVHDLTEST_NVC_PATH— path to NVC folder
pwsh ./build.ps1
The VHDLTest User Guide is available on the VHDLTest releases page.
We welcome contributions! See CONTRIBUTING.md for guidelines on submitting pull requests, reporting issues, and contributing to the project.
This project adheres to a Code of Conduct to ensure a welcoming environment for all contributors.
This project is licensed under the MIT License — see LICENSE.
If you discover a security vulnerability, please review our Security Policy for responsible disclosure.