ohsh is a small, deliberately humble command-line tool that figures out, in
the right order, which HDL (SystemVerilog and 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.
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 SystemVerilog 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:
- Search for all
manifest*.jsonfiles starting from--top-dir. - Resolve dependencies for
MODULE(the top-level). - Generate ordered SystemVerilog and VHDL source lists per library.
- Write them as
<lib>_systemverilog.src/<lib>_vhdl.srcin the output directory. - 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
Give each module a manifest.json next to its sources:
project/
├── accumulator/
│ ├── accumulator.vhd
│ └── manifest.json
└── adder/
├── adder.vhd
└── manifest.json
{
"module": "accumulator",
"sources": ["accumulator.vhd"],
"dependencies": {
"work": ["adder"]
}
}
{
"module": "adder",
"sources": ["adder.vhd"]
}
Then run ohsh in the project directory with the top module's name:
cd project
ohsh accumulator
It writes work_vhdl.src with the sources in compile order:
/path/to/project/adder/adder.vhd
/path/to/project/accumulator/accumulator.vhd
and libraries.src with the libraries to compile (here only work). Modules
with SystemVerilog sources go to <lib>_systemverilog.src in the same way. See
the manifest file format
for dependencies across libraries.
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
The full documentation is at ohsh.readthedocs.io:
- Getting started
- Manifest file format
- Integrations with simulators and build tools
- Exit codes
- Contributing and development
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ohsh-0.1.2.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ohsh-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.6 kB
Release files / ohsh-0.1.2.tar.gz
| Download URL | ohsh-0.1.2.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00c125ab32185b72c91e2fc52740fffd5d565c18560a3639e8b8a39acd3565cc
|
|
BLAKE2b-256 checksum How to use checksums |
73d3745e7c1cec28f51abca9082566a77007d41cd3d7c56f3d0f7f99f92a3cb5
|
| 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 logRelease files / ohsh-0.1.2-py3-none-any.whl
| Download URL | ohsh-0.1.2-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
906d61bc7edb4ce71128c17af98eef471a6755f95982cf64e484c67b3578a0aa
|
|
BLAKE2b-256 checksum How to use checksums |
f2f991c2d37be3e99cbe91c78d924c4020fe8506712a4df88d3e3dc140c6c3ba
|
| 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