Skip to content
hw.dev
hw.dev/signal/hdlskel-systemverilog-vhdl-same-tests-2026
Signalhdlskel

One Test Now Checks Both VHDL and SystemVerilog Hardware

hdlskel runs one Python test against VHDL and SystemVerilog implementations and compares their generated state byte for byte.

Thesis connection

A language port can be checked against the old hardware behavior automatically instead of through a manual waveform review.

#eda#testing#verification#software
Read Original

hdlskel added a SystemVerilog implementation of its register-map hardware and ran the existing Python test unchanged against both versions. The older version uses Very High Speed Integrated Circuit Hardware Description Language (VHDL). The new simulation produced a byte-identical register image and tree cache, while a separate C++ driver ran 35 checks. That is stronger evidence for a language port than two green test suites written independently.

The project uses cocotb, a Python framework that drives hardware simulators, to send the same operations through each implementation. It also added external-memory support and fixed range, latency, and packed-field bugs found while making the two versions agree. Shared inputs and exact output comparison turn the old implementation into a practical reference for the new one.

This pattern is worth copying when a hardware generator gains another output language. Preserve one behavior-level test at the boundary, run it against both simulators, and compare the generated state before reviewing implementation-specific waveforms.