This tool runs VHDL test benches and generates standard test results files.
The following will add VHDLTest to a Dotnet tool manifest file:
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local DEMAConsulting.VHDLTestThe tool can then be executed by:
dotnet vhdltest <arguments>Usage: VHDLTest [options] [tests]
Options:
-h, --help Display help
-v, --version Display version
--silent Silence console output
--verbose Verbose output
--validate Perform self-validation
-c, --config <config.yaml> Specify configuration
-r, --results <out.trx> Specify test results file
-s, --simulator <name> Specify simulator
-0, --exit-0 Exit with code 0 if test fail
-- End of options
The current list of supported simulators are:
VHDLTest needs a YAML configuration file specifying the VHDL files and test benches.
# List of VHDL source files
files:
- full_adder.vhd
- full_adder_pass_tb.vhd
- full_adder_fail_tb.vhd
- half_adder.vhd
- half_adder_pass_tb.vhd
- half_adder_fail_tb.vhd
# List of test benches to execute
tests:
- full_adder_pass_tb
- full_adder_fail_tb
- half_adder_pass_tb
- half_adder_fail_tbBefore running the tests, it may be necessary to configure where the simulators are installed. This can be done through environment variables:
- VHDLTEST_GHDL_PATH = path to GHDL folder
- VHDLTEST_MODELSIM_PATH = path to ModelSim folder
- VHDLTEST_VIVADO_PATH = path to Vivado folder
- VHDLTEST_ACTIVEHDL_PATH = path to ActiveHDL folder
- VHDLTEST_NVC_PATH = path to NVC folder
To run the tests, execute VHDLTest with the name of the configuration file.
dotnet VHDLTest --config test_suite.yamlA test results file can be generated when working in CI environments.
dotnet VHDLTest --config test_suite.yaml --results test_results.trxRunning self-validation produces a report containing the following information:
# DEMAConsulting.VHDLTest
| Information | Value |
| :------------------ | :------------------------------------------------- |
| VHDLTest Version | <version> |
| Machine Name | <machine-name> |
| OS Version | <os-version> |
| DotNet Runtime | <dotnet-runtime-version> |
| Time Stamp | <timestamp> |
Tests:
- TestPasses: Passed
- TestFails: Passed
Validation Passed
On validation failure the tool will exit with a non-zero exit code.
This report may be useful in regulated industries requiring evidence of tool validation.
We welcome contributions! Please see our Contributing Guidelines for details on how to submit pull requests, report issues, and contribute to the project.
This project adheres to a Code of Conduct to ensure a welcoming environment for all contributors.
Security is a top priority for this project. If you discover a security vulnerability, please review our Security Policy for information on how to report it responsibly.