blob: d732430dabe143cba76611a34171820a5f15db75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
.. _python_interface:
Python Interfaces
#################
.. #
we have 2 interfaces (libghdl, dom) and a service (LSP) as well as CLI entry points.
GHDL offers two Python interfaces and a language server protocol service:
* ``pyGHDL.libghdl`` - low-level API to ``libghdl``
* ``pyGHDL.dom`` - high-level API as document object model (DOM)
* ``pyGHDL.lsp`` - language server protocol (LSP) implementation and service
.. rubric:: ``pyGHDL.libghdl``
``pyGHDL.libghdl`` is a low-level API directly interacting with the shared
library ``libghdl....so``/``libghdl....dll``. This is a procedural and C-like
interface.
It comes with some Python generators for easier iterating linked lists.
.. rubric:: ``pyGHDL.dom``
``pyGHDL.dom`` is a high-level API offering a document object model (DOM).
The underlying abstract VHDL language model is provided by `pyVHDLModel <https://github.com/VHDL/pyVHDLModel>`__.
The DOM is using ``libghdl`` for file analysis and parsing.
.. rubric:: ``pyGHDL.dom``
``pyGHDL.dom`` is language server protocol (LSP) written in Python. The
implementation offers an HTTPS service that can be used e.g. by editors and
IDEs supporting LSP.
.. toctree::
:hidden:
../../pyGHDL/index
.. toctree::
:hidden:
libghdl
vhdl
utils
|