Skip to main content

ohsh - Ola's HDL Source Handler

CI Integrations PyPI Python License

ohsh is a small, deliberately humble command-line tool that figures out, in the right order, which HDL (Verilog / SystemVerilog / VHDL) source files your design needs - by reading simple per-module manifest.json files and resolving their dependencies.

It is a companion to the big build flows (like hog, Vivado, Quartus, Questa, cocotb, VUnit, …), not a replacement for them. ohsh just answers one question well - "what files, in what order, for which libraries?" - and hands you plain .src lists you can feed anywhere.

So simple it's an oh sh… that was easy moment. 🙂


Features

  • 🔍 Auto-discovers HDL module manifests anywhere under a project tree.
  • 📂 Resolves module dependencies recursively, across libraries.
  • 🔁 Detects circular dependencies and exits with an error naming the cycle.
  • 📝 Emits ordered, per-library source lists for Verilog and VHDL.
  • 📚 Writes the order to compile the libraries in.
  • ✅ Validates that every referenced source file actually exists.
  • 🐍 Pure Python, zero runtime dependencies.

Installation

pip install ohsh

Or from a clone:

git clone https://github.com/logvik-org/ohsh.git
cd ohsh
pip install .

Usage

ohsh [OPTIONS] MODULE

ohsh will:

  1. Search for all manifest*.json files starting from --top-dir.
  2. Resolve dependencies for MODULE (the top-level).
  3. Generate ordered Verilog and VHDL source lists per library.
  4. Write them as <lib>_verilog.src / <lib>_vhdl.src in the output directory.
  5. Write the library compile order to libraries.src.

Options

Option Description Default
-t, --top-dir Project top-level directory, the base for manifest discovery. cwd
-w, --work Library for the top module, which work in its manifest refers to. work
-o, --output Directory for the .src lists and libraries.src, created if missing. cwd
-v, --verbose Show progress (-v) or debug details (-vv). quiet
--log-file PATH Also write logs to a file (no log file is written by default). none
--version Print version and exit.
-h, --help Show help and exit.

Example

ohsh -t /path/to/hdl_project -w mylib -o ./src_lists top_module

Produces:

src_lists/
├── libraries.src
├── mylib_verilog.src
└── mylib_vhdl.src

Each <lib>_verilog.src / <lib>_vhdl.src file contains absolute paths to the source files, one per line, in compilation order.

libraries.src lists the library names, one per line, in the order to compile them: each library comes after the libraries it uses. Compile the libraries in this order rather than hard-coding it. If libraries depend on each other in a loop (a module in libA uses libB and a module in libB uses libA), no such order exists. ohsh then logs a warning and writes a best-effort order, which works for tools that sort files themselves (such as Vivado or Quartus projects) but may fail with tools that compile one library at a time.

Documentation

License

Licensed under the Apache License 2.0. See LICENSE and NOTICE.

Author

Ola Groettvik - GitHub

Contributions, issues, and suggestions are welcome!

Metadata

Release files for ohsh 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ohsh 0.1.0
File Size Uploaded
ohsh-0.1.0.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ohsh 0.1.0
File Interpreter ABI Platform
ohsh-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.5 kB

Release files / ohsh-0.1.0.tar.gz

Download URL ohsh-0.1.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cccd52bd55b11af6bffec1753b8decd4f123d4fdc9b295df88d3be43e16fe7e7
BLAKE2b-256 checksum
How to use checksums
7a9fd4ed041bcea961a531ff12f74ecad9e21c46a6b150e32d7425d7eb1613ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / ohsh-0.1.0-py3-none-any.whl

Download URL ohsh-0.1.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
560cc739fa5016861725b3d60947fa4f4b36d5d6b2bb2edee867cef290a3c2a6
BLAKE2b-256 checksum
How to use checksums
efc42ce6d73ebe05f135a332e0eb0ce3b4fd4e38fcab6d951882126f77dfdcb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page