Integrations

The ohsh dog running off with source files

A .src list is a text file with one absolute path per line, so most tools can read it directly or through a short loop. For a tool that resolves the entries against a directory of its own, --relative-to DIR writes them relative to DIR instead. --format hog writes the list files of a hog project directly, with the top module marked. Runnable, self-checking examples live in examples/. Each tool has a simple example (one library) and an advanced one (three libraries compiled in the order of libraries.src). The examples marked “CI” run in CI. The vendor-tool examples are marked “docs only”: they are checked against the vendor’s documentation but can’t run on a public CI runner.

ohsh-demo puts several of these together in a repository of its own: a hog project with Open Logic, colibri, UVVM and OSVVM as git submodules, and testbenches run with GHDL, NVC, VUnit and hog’s own GHDL simulation. ohsh’s CI runs it against every pull request.

For example, feeding ohsh output to GHDL:

ohsh -t my_project -o build top
while IFS= read -r lib; do
  [ -f "build/${lib}_vhdl.src" ] || continue
  while IFS= read -r f; do ghdl -a --work="$lib" --std=08 "$f"; done < "build/${lib}_vhdl.src"
done < build/libraries.src
ghdl -e --std=08 top && ghdl -r --std=08 top