Introduction
hdltbgen parses a VHDL entity declaration and generates testbench artifacts from the extracted interface.
The tool is designed for a simple, file-based workflow:
Read a VHDL file containing an entity declaration.
Extract generics, ports, and basic signal metadata.
Classify clock and reset signals automatically or from CLI options.
Generate one or more output artifacts for testbench creation.
Supported input
hdltbgen currently supports:
VHDL source files with the extension
.vhdOne top-level entity per processed file
Entity generics and ports declared in a form the regular-expression based parser can interpret
Supported generators
VHDL testbench
CSV stimulus and response table
Excel workbook with optional VBA-assisted CSV export
What the tool produces
Depending on the selected generator type, hdltbgen can create these files in the output directory:
entity_tb.vhdfor the generated testbenchentity_tb_sim.vhdfor an optional simulation wrapper around the generated testbenchentity_tb.csvfor editable stimulus and expected response vectorsentity_tb.xlsmfor spreadsheet-driven editing of vectors and export to CSV
Core capabilities
The implementation includes the following behaviors that are important when using the tool in practice:
Automatic detection of clock signals from port names containing
clkif no clock is provided explicitlyAutomatic detection of active-low resets from names such as
rstn,resetn,nreset, ornrstAutomatic detection of active-high resets from names containing
rstorresetif no active-low reset was detectedAutomatic insertion of a virtual input clock named
clk_auto_genwhen no clock can be found in the entityOptional interactive prompting for generic values via the command line
Parallel generation of multiple artifact types from the same parsed interface
When to use hdltbgen
hdltbgen is a good fit when you want to create a repeatable starting point for testbench work from an entity interface instead of writing all boilerplate by hand.
Typical use cases are:
creating a first executable VHDL testbench skeleton
preparing CSV-based stimulus tables for simulation
handing signal-oriented test vectors to engineers who prefer spreadsheet editing
generating a VUnit-compatible testbench scaffold
For the exact command-line syntax, see Usage and the generated argument reference in Command-Line Interface.