Python Interfaces#

Currently, pyGHDL is not distributed through PyPI. Therefore, users need to install it from the git repository. However, the version of the sources must be compatible with the installed version of GHDL (and the shared library libghdl). Installing from master is discouraged, because it might contain changes to the internal AST. Instead, ghdl version hash allows getting the commit hash of the version the installed binary was built from. Since pip allows installing packages by providing the URL to the git repo, this is the recommended installation procedure:

pip install git+$(ghdl version hash)

Language Server#

When installed through pip, pyGHDL provides executable entrypoints registered in the search PATH, such as ghdl-ls.


VHDL Language Protocol Server. Find info about clients in ghdl/ghdl-language-server.

usage: ghdl-ls [-h] [--version] [--verbose] [--log-file LOG_FILE]
               [--trace-file TRACE_FILE] [--input INPUT] [--disp-config]

optional arguments#

-h, --help#

show this help message and exit

--version, -V#

show program’s version number and exit

--verbose, -v#

Show debug output

--log-file <log_file>#

Redirect logs to the given file instead of stderr

--trace-file <trace_file>#

Save RPC data to and FILE.out (overrides GHDL_LS_TRACE)

--input <input>, -i <input>#

Read request from file


Display installation configuration and exit