aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2020-12-31 10:21:00 +0100
committerGitHub <noreply@github.com>2020-12-31 10:21:00 +0100
commit3f70363ee3ea05501d5b7ba84070808ac8721847 (patch)
tree2e18e5cce2cbcebfdc4259f4bd4eb3813ee9315a /pyGHDL
parent286d064a61a83ff39a389f96be86966977458a52 (diff)
downloadghdl-3f70363ee3ea05501d5b7ba84070808ac8721847.tar.gz
ghdl-3f70363ee3ea05501d5b7ba84070808ac8721847.tar.bz2
ghdl-3f70363ee3ea05501d5b7ba84070808ac8721847.zip
Added file headers and license texts. (#1564)
Diffstat (limited to 'pyGHDL')
-rw-r--r--pyGHDL/__init__.py36
-rw-r--r--pyGHDL/cli/__init__.py35
-rw-r--r--pyGHDL/cli/ghdl-ls34
-rw-r--r--pyGHDL/dom/Common.py34
-rw-r--r--pyGHDL/dom/DesignUnit.py34
-rw-r--r--pyGHDL/dom/InterfaceItem.py34
-rw-r--r--pyGHDL/dom/Misc.py34
-rw-r--r--pyGHDL/dom/__init__.py34
-rw-r--r--pyGHDL/libghdl/__init__.py46
-rw-r--r--pyGHDL/libghdl/utils/__init__.py37
10 files changed, 356 insertions, 2 deletions
diff --git a/pyGHDL/__init__.py b/pyGHDL/__init__.py
index e69de29bb..261022876 100644
--- a/pyGHDL/__init__.py
+++ b/pyGHDL/__init__.py
@@ -0,0 +1,36 @@
+# =============================================================================
+# ____ _ _ ____ _
+# _ __ _ _ / ___| | | | _ \| |
+# | '_ \| | | | | _| |_| | | | | |
+# | |_) | |_| | |_| | _ | |_| | |___
+# | .__/ \__, |\____|_| |_|____/|_____|
+# |_| |___/
+# =============================================================================
+# Authors: Tristan Gingold
+# Patrick Lehmann
+# Unai Martinez-Corral
+#
+# Package package: Python binding for GHDL and high-level APIs.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
diff --git a/pyGHDL/cli/__init__.py b/pyGHDL/cli/__init__.py
index e69de29bb..f3165ec9c 100644
--- a/pyGHDL/cli/__init__.py
+++ b/pyGHDL/cli/__init__.py
@@ -0,0 +1,35 @@
+# =============================================================================
+# ____ _ _ ____ _ _ _
+# _ __ _ _ / ___| | | | _ \| | ___| (_)
+# | '_ \| | | | | _| |_| | | | | | / __| | |
+# | |_) | |_| | |_| | _ | |_| | |___ | (__| | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)___|_|_|
+# |_| |___/
+# =============================================================================
+# Authors: Patrick Lehmann
+# Unai Martinez-Corral
+#
+# Package package: Package for command line interfaces.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
diff --git a/pyGHDL/cli/ghdl-ls b/pyGHDL/cli/ghdl-ls
index 33949fa67..2ccb41b16 100644
--- a/pyGHDL/cli/ghdl-ls
+++ b/pyGHDL/cli/ghdl-ls
@@ -1,4 +1,38 @@
#!/usr/bin/env python
+# =============================================================================
+# ____ _ _ ____ _ _ _
+# _ __ _ _ / ___| | | | _ \| | ___| (_)
+# | '_ \| | | | | _| |_| | | | | | / __| | |
+# | |_) | |_| | |_| | _ | |_| | |___ | (__| | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)___|_|_|
+# |_| |___/
+# =============================================================================
+# Authors: Tristan Gingold
+#
+# Package module: GHDLs Language Server implementing LSP for VHDL.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
from __future__ import absolute_import
import argparse
diff --git a/pyGHDL/dom/Common.py b/pyGHDL/dom/Common.py
index 0cd41c99e..224cf80b5 100644
--- a/pyGHDL/dom/Common.py
+++ b/pyGHDL/dom/Common.py
@@ -1,3 +1,37 @@
+# =============================================================================
+# ____ _ _ ____ _ _
+# _ __ _ _ / ___| | | | _ \| | __| | ___ _ __ ___
+# | '_ \| | | | | _| |_| | | | | | / _` |/ _ \| '_ ` _ \
+# | |_) | |_| | |_| | _ | |_| | |___ | (_| | (_) | | | | | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)__,_|\___/|_| |_| |_|
+# |_| |___/
+# =============================================================================
+# Authors: Patrick Lehmann
+#
+# Package module: DOM: Common classes for package pyGHDL.dom.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
from pydecor import export
from pyVHDLModel.VHDLModel import Modes
diff --git a/pyGHDL/dom/DesignUnit.py b/pyGHDL/dom/DesignUnit.py
index 3e87bb41a..62a3af981 100644
--- a/pyGHDL/dom/DesignUnit.py
+++ b/pyGHDL/dom/DesignUnit.py
@@ -1,3 +1,37 @@
+# =============================================================================
+# ____ _ _ ____ _ _
+# _ __ _ _ / ___| | | | _ \| | __| | ___ _ __ ___
+# | '_ \| | | | | _| |_| | | | | | / _` |/ _ \| '_ ` _ \
+# | |_) | |_| | |_| | _ | |_| | |___ | (_| | (_) | | | | | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)__,_|\___/|_| |_| |_|
+# |_| |___/
+# =============================================================================
+# Authors: Patrick Lehmann
+#
+# Package module: DOM: VHDL design units (e.g. entity or package).
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
from pydecor import export
from pyVHDLModel.VHDLModel import Entity as VHDLModel_Entity
diff --git a/pyGHDL/dom/InterfaceItem.py b/pyGHDL/dom/InterfaceItem.py
index 0833c2547..b364df31a 100644
--- a/pyGHDL/dom/InterfaceItem.py
+++ b/pyGHDL/dom/InterfaceItem.py
@@ -1,3 +1,37 @@
+# =============================================================================
+# ____ _ _ ____ _ _
+# _ __ _ _ / ___| | | | _ \| | __| | ___ _ __ ___
+# | '_ \| | | | | _| |_| | | | | | / _` |/ _ \| '_ ` _ \
+# | |_) | |_| | |_| | _ | |_| | |___ | (_| | (_) | | | | | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)__,_|\___/|_| |_| |_|
+# |_| |___/
+# =============================================================================
+# Authors: Patrick Lehmann
+#
+# Package module: DOM: Interface items (e.g. generic or port)
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
from pydecor import export
from pyVHDLModel.VHDLModel import PortSignalInterfaceItem as VHDLModel_PortSignalInterfaceItem
diff --git a/pyGHDL/dom/Misc.py b/pyGHDL/dom/Misc.py
index 0c9736cb0..049a8c2ac 100644
--- a/pyGHDL/dom/Misc.py
+++ b/pyGHDL/dom/Misc.py
@@ -1,3 +1,37 @@
+# =============================================================================
+# ____ _ _ ____ _ _
+# _ __ _ _ / ___| | | | _ \| | __| | ___ _ __ ___
+# | '_ \| | | | | _| |_| | | | | | / _` |/ _ \| '_ ` _ \
+# | |_) | |_| | |_| | _ | |_| | |___ | (_| | (_) | | | | | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)__,_|\___/|_| |_| |_|
+# |_| |___/
+# =============================================================================
+# Authors: Patrick Lehmann
+#
+# Package module: DOM: Elements not covered by the VHDL standard.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
from pathlib import Path
from typing import Any
diff --git a/pyGHDL/dom/__init__.py b/pyGHDL/dom/__init__.py
index df2dfb868..74348c59b 100644
--- a/pyGHDL/dom/__init__.py
+++ b/pyGHDL/dom/__init__.py
@@ -1,3 +1,37 @@
+# =============================================================================
+# ____ _ _ ____ _ _
+# _ __ _ _ / ___| | | | _ \| | __| | ___ _ __ ___
+# | '_ \| | | | | _| |_| | | | | | / _` |/ _ \| '_ ` _ \
+# | |_) | |_| | |_| | _ | |_| | |___ | (_| | (_) | | | | | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)__,_|\___/|_| |_| |_|
+# |_| |___/
+# =============================================================================
+# Authors: Patrick Lehmann
+#
+# Package package: Document object model (DOM) for pyGHDL.libghdl.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
from pydecor import export
__all__ = []
diff --git a/pyGHDL/libghdl/__init__.py b/pyGHDL/libghdl/__init__.py
index 431008df3..d59803d68 100644
--- a/pyGHDL/libghdl/__init__.py
+++ b/pyGHDL/libghdl/__init__.py
@@ -1,3 +1,37 @@
+# =============================================================================
+# ____ _ _ ____ _ _ _ _ _ _ _
+# _ __ _ _ / ___| | | | _ \| | | (_) |__ __ _| |__ __| | |
+# | '_ \| | | | | _| |_| | | | | | | | | '_ \ / _` | '_ \ / _` | |
+# | |_) | |_| | |_| | _ | |_| | |___ _| | | |_) | (_| | | | | (_| | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)_|_|_.__/ \__, |_| |_|\__,_|_|
+# |_| |___/ |___/
+# =============================================================================
+# Authors: Tristan Gingold
+#
+# Package package: Python binding and low-level API for shared library 'libghdl'.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
import ctypes
import os
import sys
@@ -35,7 +69,17 @@ def _check_libghdl_bindir(bindir, basename):
def _get_libghdl_path():
- """Locate the directory where the shared library is"""
+ """
+ Locate the directory where the shared library is installed.
+
+ Search order:
+
+ 1. `GHDL_PREFIX` - directory (prefix) of the vhdl libraries.
+ 2. `VUNIT_GHDL_PATH` - path of the `ghdl` binary when using VUnit.
+ 3. `GHDL` - name of, or path to the `ghdl` binary.
+ 4. Try within `libghdl/` Python installation.
+ 5. Try when running from the build directory.
+ """
basename = _get_libghdl_name()
# Try GHDL_PREFIX
r = os.environ.get("GHDL_PREFIX")
diff --git a/pyGHDL/libghdl/utils/__init__.py b/pyGHDL/libghdl/utils/__init__.py
index a8e0d4f3f..149009689 100644
--- a/pyGHDL/libghdl/utils/__init__.py
+++ b/pyGHDL/libghdl/utils/__init__.py
@@ -1,4 +1,39 @@
-from ctypes import c_char_p, c_int32, c_int, c_bool, sizeof, c_void_p, byref
+# =============================================================================
+# ____ _ _ ____ _ _ _ _ _ _ _
+# _ __ _ _ / ___| | | | _ \| | | (_) |__ __ _| |__ __| | |
+# | '_ \| | | | | _| |_| | | | | | | | | '_ \ / _` | '_ \ / _` | |
+# | |_) | |_| | |_| | _ | |_| | |___ _| | | |_) | (_| | | | | (_| | |
+# | .__/ \__, |\____|_| |_|____/|_____(_)_|_|_.__/ \__, |_| |_|\__,_|_|
+# |_| |___/ |___/
+# =============================================================================
+# Authors: Tristan Gingold
+#
+# Package module: Generators/iterators and low-level helpers for pyGHDL.libghdl.
+#
+# License:
+# ============================================================================
+# Copyright (C) 2019-2020 Tristan Gingold
+#
+# GHDL is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GHDL; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+# ============================================================================
+#
+from ctypes import byref
+
import pyGHDL.libghdl.name_table as name_table
import pyGHDL.libghdl.vhdl.nodes as nodes
import pyGHDL.libghdl.vhdl.nodes_meta as nodes_meta