aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2020-12-29 17:19:09 +0100
committerGitHub <noreply@github.com>2020-12-29 17:19:09 +0100
commit7ca54117b8f757396ba5ef04c83ff1228ca94384 (patch)
treecc5f7f4166cc0570bda5cf2047d3ef7abbc36e37
parent340fc792bba2ffdb4f930bc427a39ea3a1b659b2 (diff)
parent50adcf884c3cfa4e33ca45769295f163baa63a3e (diff)
downloadghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.tar.gz
ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.tar.bz2
ghdl-7ca54117b8f757396ba5ef04c83ff1228ca94384.zip
Merge pull request #1556 from Paebbels/paebbels/pyGHDL
Cleanup and Restructuring of pyGHDL
-rw-r--r--.coveragerc12
-rw-r--r--.github/workflows/doc.yml2
-rw-r--r--.github/workflows/push.yml37
-rw-r--r--.gitignore42
-rw-r--r--Makefile.in2
-rw-r--r--README.md2
-rwxr-xr-xconfigure2
-rwxr-xr-xdist/ci-run.sh37
-rw-r--r--dist/msys2-llvm/PKGBUILD (renamed from dist/msys2-mingw/llvm/PKGBUILD)2
-rw-r--r--dist/msys2-mcode/PKGBUILD (renamed from dist/msys2-mingw/mcode/PKGBUILD)2
-rw-r--r--dist/msys2-mingw/run.sh91
-rw-r--r--doc/index.rst2
-rw-r--r--doc/internals/AST.rst2
-rw-r--r--doc/requirements.txt2
-rw-r--r--doc/using/py/pyutils.rst4
-rw-r--r--doc/using/py/thin.rst48
-rw-r--r--doc/using/py/vhdl.rst79
-rw-r--r--doc/using/pyGHDL/index.rst (renamed from doc/using/py/libghdl.rst)6
-rw-r--r--doc/using/pyGHDL/libghdl.rst49
-rw-r--r--doc/using/pyGHDL/utils.rst4
-rw-r--r--doc/using/pyGHDL/vhdl.rst79
-rw-r--r--pyGHDL/README.md11
-rw-r--r--pyGHDL/__init__.py (renamed from python/libghdl/thin/__init__.py)0
-rw-r--r--pyGHDL/cli/__init__.py (renamed from python/libghdl/thin/vhdl/__init__.py)0
-rw-r--r--pyGHDL/cli/ghdl-ls (renamed from python/vhdl_langserver/main.py)47
-rw-r--r--pyGHDL/dom/Common.py48
-rw-r--r--pyGHDL/dom/DesignUnit.py101
-rw-r--r--pyGHDL/dom/InterfaceItem.py33
-rw-r--r--pyGHDL/dom/Misc.py101
-rw-r--r--pyGHDL/dom/__init__.py4
-rw-r--r--pyGHDL/libghdl/__init__.py (renamed from python/libghdl/__init__.py)2
-rw-r--r--pyGHDL/libghdl/errorout.py (renamed from python/libghdl/thin/errorout.py)2
-rw-r--r--pyGHDL/libghdl/errorout_console.py (renamed from python/libghdl/thin/errorout_console.py)2
-rw-r--r--pyGHDL/libghdl/errorout_memory.py (renamed from python/libghdl/thin/errorout_memory.py)2
-rw-r--r--pyGHDL/libghdl/files_map.py (renamed from python/libghdl/thin/files_map.py)2
-rw-r--r--pyGHDL/libghdl/files_map_editor.py (renamed from python/libghdl/thin/files_map_editor.py)2
-rw-r--r--pyGHDL/libghdl/flags.py (renamed from python/libghdl/thin/flags.py)2
-rw-r--r--pyGHDL/libghdl/libraries.py (renamed from python/libghdl/thin/libraries.py)2
-rw-r--r--pyGHDL/libghdl/name_table.py (renamed from python/libghdl/thin/name_table.py)2
-rw-r--r--pyGHDL/libghdl/std_names.py (renamed from python/libghdl/thin/std_names.py)0
-rw-r--r--pyGHDL/libghdl/utils/__init__.py (renamed from python/libghdl/thin/vhdl/pyutils.py)12
-rw-r--r--pyGHDL/libghdl/version.py (renamed from python/libghdl/version.py)0
-rw-r--r--pyGHDL/libghdl/vhdl/__init__.py (renamed from python/vhdl_langserver/__init__.py)0
-rw-r--r--pyGHDL/libghdl/vhdl/canon.py (renamed from python/libghdl/thin/vhdl/canon.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/elocations.py (renamed from python/libghdl/thin/vhdl/elocations.py)2
-rw-r--r--pyGHDL/libghdl/vhdl/flists.py (renamed from python/libghdl/thin/vhdl/flists.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/formatters.py (renamed from python/libghdl/thin/vhdl/formatters.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/ieee.py (renamed from python/libghdl/thin/vhdl/ieee.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/lists.py (renamed from python/libghdl/thin/vhdl/lists.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/nodes.py (renamed from python/libghdl/thin/vhdl/nodes.py)931
-rw-r--r--pyGHDL/libghdl/vhdl/nodes_meta.py1604
-rw-r--r--pyGHDL/libghdl/vhdl/nodes_utils.py (renamed from python/libghdl/thin/vhdl/nodes_utils.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/parse.py (renamed from python/libghdl/thin/vhdl/parse.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/scanner.py (renamed from python/libghdl/thin/vhdl/scanner.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/sem.py (renamed from python/libghdl/thin/vhdl/sem.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/sem_lib.py (renamed from python/libghdl/thin/vhdl/sem_lib.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/std_package.py (renamed from python/libghdl/thin/vhdl/std_package.py)3
-rw-r--r--pyGHDL/libghdl/vhdl/tokens.py (renamed from python/libghdl/thin/vhdl/tokens.py)2
-rw-r--r--pyGHDL/lsp/README (renamed from python/README)2
-rw-r--r--pyGHDL/lsp/__init__.py23
-rw-r--r--pyGHDL/lsp/document.py (renamed from python/vhdl_langserver/document.py)18
-rw-r--r--pyGHDL/lsp/lsp.py (renamed from python/vhdl_langserver/lsp.py)0
-rw-r--r--pyGHDL/lsp/lsptools.py (renamed from python/vhdl_langserver/lsptools.py)0
-rw-r--r--pyGHDL/lsp/references.py (renamed from python/vhdl_langserver/references.py)8
-rw-r--r--pyGHDL/lsp/symbols.py (renamed from python/vhdl_langserver/symbols.py)12
-rw-r--r--pyGHDL/lsp/version.py (renamed from python/vhdl_langserver/version.py)0
-rw-r--r--pyGHDL/lsp/vhdl_ls.py (renamed from python/vhdl_langserver/vhdl_ls.py)0
-rw-r--r--pyGHDL/lsp/workspace.py (renamed from python/vhdl_langserver/workspace.py)38
-rw-r--r--pyGHDL/requirements.txt2
-rwxr-xr-xpython/ghdl-ls4
-rw-r--r--python/libghdl/thin/vhdl/nodes_meta.py1294
-rw-r--r--python/setup.py46
-rwxr-xr-xscripts/pnodes.py (renamed from python/xtools/pnodes.py)297
-rwxr-xr-xscripts/pnodespy.py (renamed from python/xtools/pnodespy.py)5
-rw-r--r--setup.py122
-rw-r--r--src/edif/Makefile12
-rw-r--r--src/psl/Makefile11
-rw-r--r--src/vhdl/Makefile35
-rwxr-xr-xtestsuite/python/testsuite.sh53
-rw-r--r--testsuite/python/units01/demo.vhdl12
-rw-r--r--testsuite/python/units01/show_ports.py111
-rwxr-xr-xtestsuite/python/units01/show_units.py55
-rwxr-xr-xtestsuite/python/units01/testsuite.sh11
-rw-r--r--testsuite/pyunit/SimpleEntity.vhdl27
-rw-r--r--testsuite/pyunit/SimplePackage.vhdl21
-rw-r--r--testsuite/pyunit/__init__.py14
-rw-r--r--testsuite/pyunit/dom/SimpleEntity.py46
-rw-r--r--testsuite/pyunit/dom/__init__.py13
-rw-r--r--testsuite/pyunit/libghdl/Initialize.py62
-rw-r--r--testsuite/pyunit/libghdl/__init__.py13
-rw-r--r--testsuite/requirements.txt4
-rwxr-xr-xtestsuite/testsuite.sh16
92 files changed, 3235 insertions, 2605 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 000000000..0ebb5bd64
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,12 @@
+[run]
+branch = true
+
+[report]
+skip_covered = True
+skip_empty = True
+
+[html]
+directory = .cov
+
+[xml]
+output = coverage.xml
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 5cd33e03b..3ca172187 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -16,7 +16,7 @@ jobs:
run: |
docker build -t ghdl/doc - <<-EOF
FROM ghdl/vunit:llvm
- ENV PYTHONPATH=/src/python
+ ENV PYTHONPATH=/src/pyGHDL
RUN apt update -qq && apt install -y gnat-gps \
&& ln -s /usr/bin/pip3 /usr/bin/pip
EOF
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index 179b833e0..55d1cc3e7 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -6,6 +6,7 @@ on:
env:
CI: true
+ DOCKER_BUILDKIT: 1
jobs:
@@ -115,15 +116,14 @@ jobs:
max-parallel: 2
matrix:
include: [
- {installs: "MINGW32", pkg: "mcode"},
- #{installs: "MINGW32", pkg: "llvm"}, ! Not yet functional
- #{installs: "MINGW64", pkg: "mcode"}, ! mcode is not yet supported on win64
- {installs: "MINGW64", pkg: "llvm"},
+ {installs: "MINGW32", arch: i686, pkg: "mcode"},
+ #{installs: "MINGW32", arch: i686, pkg: "llvm"}, ! Not yet functional
+ #{installs: "MINGW64", arch: x86_64, pkg: "mcode"}, ! mcode is not yet supported on win64
+ {installs: "MINGW64", arch: x86_64, pkg: "llvm"},
]
name: '🟪 MSYS2 · ${{ matrix.installs }} · ${{ matrix.pkg }}'
env:
MINGW_INSTALLS: ${{ matrix.installs }}
- TARGET: ${{ matrix.pkg }}
defaults:
run:
shell: msys2 {0}
@@ -134,34 +134,45 @@ jobs:
with:
msystem: MSYS
update: true
- install: base-devel git
+ install: >
+ base-devel
+ git
+ mingw-w64-${{ matrix.arch }}-toolchain
+ mingw-w64-${{ matrix.arch }}-python-pip
- run: git config --global core.autocrlf input
shell: bash
- name: '🧰 Checkout'
uses: actions/checkout@v2
+ with:
+ # The command 'git describe' (used for version) needs the history.
+ fetch-depth: 0
+
+ - name: Build package
+ run: |
+ cd dist/msys2-${{ matrix.pkg }}
+ makepkg-mingw --noconfirm --noprogressbar -sCLf
- - name: Build and (hopefully) install package
- run: ./dist/msys2-mingw/run.sh -b
+ - name: Install package
+ run: pacman --noconfirm -U dist/msys2-${{ matrix.pkg }}/mingw-w64-*-any.pkg.tar.zst
- name: '📤 Upload artifact: builddir'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.installs }}-${{ matrix.pkg }}-builddir
path: |
- ./dist/msys2-mingw/${{ matrix.pkg }}/src/
- ./dist/msys2-mingw/${{ matrix.pkg }}/pkg/
+ ./dist/msys2-${{ matrix.pkg }}/src/
+ ./dist/msys2-${{ matrix.pkg }}/pkg/
- name: '📤 Upload artifact: package'
uses: actions/upload-artifact@v2
with:
- path: ./dist/msys2-mingw/${{ matrix.pkg }}/mingw-*ghdl*.pkg.tar.zst
+ path: ./dist/msys2-${{ matrix.pkg }}/mingw-*ghdl*.pkg.tar.zst
- name: Test package
run: |
- env | grep MSYSTEM
- env | grep MINGW
+ pip3 install -r testsuite/requirements.txt
GHDL=ghdl ./testsuite/testsuite.sh
env:
MSYSTEM: ${{ matrix.installs }}
diff --git a/.gitignore b/.gitignore
index 897fd0904..2a290d646 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,8 @@
+# Ada outputs
*~
*.ali
*.o
b~*.ad?
-*.v87
-*.v93
-*.v08
-*.cf
-.gdb_history
-*.pyc
-
-testsuite/get_entities
# Generated files on windows.
/build/
@@ -19,7 +12,6 @@ testsuite/get_entities
# Generated files on Linux
config.status
default_paths.ads
-doc/_build/
elf_arch.ads
ghdl1-*
ghdl.gpr
@@ -44,3 +36,35 @@ run-bind.ads
src/version.ads
version.ads
version.tmp
+
+# GDB outputs
+.gdb_history
+
+# GHDL outputs
+*.v87
+*.v93
+*.v08
+*.cf
+
+# GHDLs testsuite
+testsuite/get_entities
+
+# Python cache and object files
+__pycache__/
+*.py[cod]
+
+# Python installation packages
+dist/
+
+# Coverage.py
+.coverage
+.cov
+coverage.xml
+
+# Sphinx
+doc/_build/
+doc/pyGHDL/**/*.*
+!doc/pyGHDL/index.rst
+
+# IntelliJ project files
+/.idea/workspace.xml
diff --git a/Makefile.in b/Makefile.in
index 1ef92ac8d..c089789d5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -457,7 +457,7 @@ uninstall.libghdl:
libghdl-py.tgz:
[ -d pythonb ] || $(MKDIR) pythonb
- $(CP) -r $(srcdir)/python/libghdl $(srcdir)/python/setup.py pythonb
+ $(CP) -r $(srcdir)/pyGHDL/libghdl $(srcdir)/setup.py pythonb
tar -zcvf $@ -C pythonb .
################ ghwdump #################################################
diff --git a/README.md b/README.md
index becdbf3bf..ae032c91d 100644
--- a/README.md
+++ b/README.md
@@ -98,7 +98,7 @@ That's all!
- `libghdl` is a shared library that includes a subset of the regular features plus some features to be used by extension tools (i.e. `libghdl-py`). This is built along with the regular GHDL and it supports both non-synthesisable and synthesisable code. Nonetheless, this is not for users, but for tools built on top of the core. When configured along with `--enable-synth`, this shared library includes **[experimental]** synthesis features too.
-- [libghdl-py](python/libghdl) is a Python interface to `libghdl`. Currently, it is only used by `ghdl-ls`; however, it can be useful for advanced users which are willing to build Python utilities based on GHDL.
+- [pyGHDL](pyGHDL) is a Python interface to `libghdl`. Currently, it is only used by `ghdl-ls`; however, it can be useful for advanced users which are willing to build Python utilities based on GHDL.
- **[experimental]** [ghdl-yosys-plugin](https://github.com/ghdl/ghdl-yosys-plugin) is the integration of GHDL as a frontend plugin module for [Yosys Open SYnthesis Suite](http://www.clifford.at/yosys/), which uses the `libghdl` library (built with `--enable-synth`).
diff --git a/configure b/configure
index 83d9b2628..75599d776 100755
--- a/configure
+++ b/configure
@@ -190,7 +190,7 @@ fi
# Check the version of libghdl is correct.
if [ "$enable_libghdl" = true ]; then
- libghdl_version="$srcdir/python/libghdl/version.py"
+ libghdl_version="$srcdir/pyGHDL/libghdl/version.py"
# Extract content between single quotes in version.py, to avoid false positives due to LF/CRLF mismatch.
if [ "$ghdl_version" != "`sed 's/.*"\(.*\)".*/\1/g' $libghdl_version`" ]; then
echo "Sorry, the version of $libghdl_version is not correct"
diff --git a/dist/ci-run.sh b/dist/ci-run.sh
index cd4a2572b..43e1c8b66 100755
--- a/dist/ci-run.sh
+++ b/dist/ci-run.sh
@@ -424,17 +424,42 @@ ci_run () {
else
# Build ghdl/ghdl:$GHDL_IMAGE_TAG image
build_img_ghdl
- # Run test in docker container
+
tests="sanity"
+
+ case "$GHDL_IMAGE_TAG" in
+ *ubuntu20*|*buster*)
+ GHDL_TEST_IMAGE="test:$GHDL_IMAGE_TAG-py"
+ gstart "[CI] Docker build $GHDL_TEST_IMAGE" "$ANSI_BLUE"
+ docker build -t "$GHDL_TEST_IMAGE" . -f- <<-EOF
+# syntax=docker/dockerfile:experimental
+FROM ghdl/ghdl:$GHDL_IMAGE_TAG
+RUN apt update -qq && apt install -y python3 python3-pip
+RUN --mount=type=bind,src=./,target=/tmp/ghdl/ \
+ pip3 install -r /tmp/ghdl/testsuite/requirements.txt
+EOF
+ gend
+ tests+=" pyunit"
+ ;;
+ *)
+ GHDL_TEST_IMAGE="ghdl/ghdl:$GHDL_IMAGE_TAG"
+ ;;
+ esac
+
if [ "x$ISGPL" != "xtrue" ]; then
- tests="$tests gna"
+ tests+=" gna"
fi
- tests="$tests vests"
+
+ tests+=" vests"
+
if [ "x$ISSYNTH" = "xtrue" ]; then
- tests="$tests synth"
+ tests+=" synth"
fi
- tests="$tests vpi"
- $RUN "ghdl/ghdl:$GHDL_IMAGE_TAG" bash -c "GHDL=ghdl ./testsuite/testsuite.sh $tests"
+
+ tests+=" vpi"
+
+ # Run tests in docker container
+ $RUN "$GHDL_TEST_IMAGE" bash -c "GHDL=ghdl ./testsuite/testsuite.sh $tests"
fi
if [ ! -f testsuite/test_ok ]; then
diff --git a/dist/msys2-mingw/llvm/PKGBUILD b/dist/msys2-llvm/PKGBUILD
index 9fe2c28bd..6de6916dc 100644
--- a/dist/msys2-mingw/llvm/PKGBUILD
+++ b/dist/msys2-llvm/PKGBUILD
@@ -13,7 +13,7 @@ build() {
cd "${srcdir}/builddir"
export CC=clang
export CXX=clang++
- ../../../../../configure --prefix=${MINGW_PREFIX} --with-llvm-config="llvm-config --link-static" LDFLAGS="-static" --enable-libghdl --enable-synth
+ ../../../../configure --prefix=${MINGW_PREFIX} --with-llvm-config="llvm-config --link-static" LDFLAGS="-static" --enable-libghdl --enable-synth
make GNATMAKE="gnatmake -j$(nproc)"
}
diff --git a/dist/msys2-mingw/mcode/PKGBUILD b/dist/msys2-mcode/PKGBUILD
index 75205b025..70423d64d 100644
--- a/dist/msys2-mingw/mcode/PKGBUILD
+++ b/dist/msys2-mcode/PKGBUILD
@@ -11,7 +11,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gcc-ada")
build() {
mkdir "${srcdir}/builddir"
cd "${srcdir}/builddir"
- ../../../../../configure --prefix=${MINGW_PREFIX} LDFLAGS=-static --enable-libghdl --enable-synth
+ ../../../../configure --prefix=${MINGW_PREFIX} LDFLAGS=-static --enable-libghdl --enable-synth
make GNATMAKE="gnatmake -j$(nproc)"
}
diff --git a/dist/msys2-mingw/run.sh b/dist/msys2-mingw/run.sh
deleted file mode 100644
index 186520b05..000000000
--- a/dist/msys2-mingw/run.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-
-cd $(dirname $0)
-
-# Stop in case of error
-set -e
-
-enable_color() {
- ENABLECOLOR='-c '
- ANSI_RED="\033[31m"
- ANSI_GREEN="\033[32m"
- ANSI_YELLOW="\033[33m"
- ANSI_BLUE="\033[34m"
- ANSI_MAGENTA="\033[35m"
- ANSI_GRAY="\033[90m"
- ANSI_CYAN="\033[36;1m"
- ANSI_DARKCYAN="\033[36m"
- ANSI_NOCOLOR="\033[0m"
-}
-
-disable_color() { unset ENABLECOLOR ANSI_RED ANSI_GREEN ANSI_YELLOW ANSI_BLUE ANSI_MAGENTA ANSI_CYAN ANSI_DARKCYAN ANSI_NOCOLOR; }
-enable_color
-
-print_start() {
- if [ "x$2" != "x" ]; then
- COL="$2"
- elif [ "x$BASE_COL" != "x" ]; then
- COL="$BASE_COL"
- else
- COL="$ANSI_YELLOW"
- fi
- printf "${COL}${1}$ANSI_NOCOLOR\n"
-}
-
-gstart () {
- print_start "$@"
-}
-gend () {
- :
-}
-gblock () {
- gstart "$1"
- shift
- $@
- gend
-}
-
-[ -n "$CI" ] && {
- echo "INFO: set 'gstart' and 'gend' for CI"
- gstart () {
- printf '::group::'
- print_start "$@"
- SECONDS=0
- }
-
- gend () {
- duration=$SECONDS
- echo '::endgroup::'
- printf "${ANSI_GRAY}took $(($duration / 60)) min $(($duration % 60)) sec.${ANSI_NOCOLOR}\n"
- }
-} || echo "INFO: not in CI"
-
-#---
-
-if [ -z "$TARGET" ]; then
- printf "${ANSI_RED}Undefined TARGET!$ANSI_NOCOLOR"
- exit 1
-fi
-cd "$TARGET"
-
-# The command 'git describe' (used for version) needs the history. Get it.
-# But the following command fails if the repository is complete.
-gblock "Fetch --unshallow" git fetch --unshallow || true
-
-case "$MINGW_INSTALLS" in
- *32)
- TARBALL_ARCH="i686"
- ;;
- *64)
- TARBALL_ARCH="x86_64"
- ;;
- *)
- printf "${ANSI_RED}Unknown MINGW_INSTALLS=${MINGW_INSTALLS}!$ANSI_NOCOLOR"
- exit 1
-esac
-
-gblock 'Install toolchain' pacman -S --noconfirm --needed base-devel mingw-w64-${TARBALL_ARCH}-toolchain
-gblock 'Build package' makepkg-mingw --noconfirm --noprogressbar -sCLf --noarchive
-gblock 'Archive package' makepkg-mingw --noconfirm --noprogressbar -R
-gblock 'List artifacts' ls -la
-gblock 'Install package' pacman --noconfirm -U "mingw-w64-${TARBALL_ARCH}-ghdl-${TARGET}-ci"-*-any.pkg.tar.zst
diff --git a/doc/index.rst b/doc/index.rst
index 8ea01b675..3fc554d56 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -145,7 +145,7 @@ GHDL
using/Foreign
using/ImplementationOfVHDL
using/ImplementationOfVITAL
- using/py/libghdl
+ using/pyGHDL/index
.. raw:: latex
diff --git a/doc/internals/AST.rst b/doc/internals/AST.rst
index 488fa6d71..ad52f0286 100644
--- a/doc/internals/AST.rst
+++ b/doc/internals/AST.rst
@@ -75,7 +75,7 @@ either a node reference, a boolean flag or a enumerated type (like
node or to a list.
The accessors for the node are generated automatically by the python
-script :file:`src/xtools/pnodes.py`.
+script :file:`src/scripts/pnodes.py`.
Why a meta-model ?
******************
diff --git a/doc/requirements.txt b/doc/requirements.txt
index e632e6afd..1c95fd25e 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,4 +1,4 @@
-#-r ../requirements.txt
+-r ../pyGHDL/requirements.txt
sphinx>=3.0.0
recommonmark
python-dateutil
diff --git a/doc/using/py/pyutils.rst b/doc/using/py/pyutils.rst
deleted file mode 100644
index 58a84496a..000000000
--- a/doc/using/py/pyutils.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-libghdl.thin.vhdl.pyutils
-=========================
-
-.. automodule:: libghdl.thin.vhdl.pyutils
diff --git a/doc/using/py/thin.rst b/doc/using/py/thin.rst
deleted file mode 100644
index e02b48aec..000000000
--- a/doc/using/py/thin.rst
+++ /dev/null
@@ -1,48 +0,0 @@
-libghdl.thin
-============
-
-libghdl.thin.errorout
----------------------
-
-.. automodule:: libghdl.thin.errorout
-
-libghdl.thin.errorout_console
------------------------------
-
-.. automodule:: libghdl.thin.errorout_console
-
-libghdl.thin.errorout_memory
------------------------------
-
-.. automodule:: libghdl.thin.errorout_memory
-
-libghdl.thin.files_map
-----------------------
-
-.. automodule:: libghdl.thin.files_map
-
-libghdl.thin.files_map_editor
------------------------------
-
-.. automodule:: libghdl.thin.files_map_editor
-
-libghdl.thin.flags
-------------------
-
-.. automodule:: libghdl.thin.flags
-
-libghdl.thin.libraries
-----------------------
-
-.. automodule:: libghdl.thin.libraries
-
-libghdl.thin.name_table
------------------------
-
-.. automodule:: libghdl.thin.name_table
-
-libghdl.thin.std_names
-----------------------
-
-.. automodule:: libghdl.thin.std_names
-
diff --git a/doc/using/py/vhdl.rst b/doc/using/py/vhdl.rst
deleted file mode 100644
index e978cc6e8..000000000
--- a/doc/using/py/vhdl.rst
+++ /dev/null
@@ -1,79 +0,0 @@
-libghdl.thin.vhdl
-=================
-
-.. automodule:: libghdl.thin.vhdl
-
-libghdl.thin.vhdl.canon
------------------------
-
-.. automodule:: libghdl.thin.vhdl.canon
-
-libghdl.thin.vhdl.elocations
-----------------------------
-
-.. automodule:: libghdl.thin.vhdl.elocations
-
-libghdl.thin.vhdl.flists
-------------------------
-
-.. automodule:: libghdl.thin.vhdl.flists
-
-libghdl.thin.vhdl.formatters
-----------------------------
-
-.. automodule:: libghdl.thin.vhdl.formatters
-
-libghdl.thin.vhdl.ieee
-----------------------
-
-.. automodule:: libghdl.thin.vhdl.ieee
-
-libghdl.thin.vhdl.lists
------------------------
-
-.. automodule:: libghdl.thin.vhdl.lists
-
-libghdl.thin.vhdl.nodes
------------------------
-
-.. automodule:: libghdl.thin.vhdl.nodes
-
-libghdl.thin.vhdl.nodes_meta
-----------------------------
-
-.. automodule:: libghdl.thin.vhdl.nodes_meta
-
-libghdl.thin.vhdl.nodes_utils
------------------------------
-
-.. automodule:: libghdl.thin.vhdl.nodes_utils
-
-libghdl.thin.vhdl.parse
------------------------
-
-.. automodule:: libghdl.thin.vhdl.parse
-
-libghdl.thin.vhdl.scanner
--------------------------
-
-.. automodule:: libghdl.thin.vhdl.scanner
-
-libghdl.thin.vhdl.sem
----------------------
-
-.. automodule:: libghdl.thin.vhdl.sem
-
-libghdl.thin.vhdl.sem_lib
--------------------------
-
-.. automodule:: libghdl.thin.vhdl.sem_lib
-
-libghdl.thin.vhdl.std_package
------------------------------
-
-.. automodule:: libghdl.thin.vhdl.std_package
-
-libghdl.thin.vhdl.tokens
-------------------------
-
-.. automodule:: libghdl.thin.vhdl.tokens
diff --git a/doc/using/py/libghdl.rst b/doc/using/pyGHDL/index.rst
index 7c95ab8c1..2b2191798 100644
--- a/doc/using/py/libghdl.rst
+++ b/doc/using/pyGHDL/index.rst
@@ -3,11 +3,9 @@
Python Interface
################
-.. automodule:: libghdl
-
.. toctree::
:hidden:
- thin
+ libghdl
vhdl
- pyutils
+ utils
diff --git a/doc/using/pyGHDL/libghdl.rst b/doc/using/pyGHDL/libghdl.rst
new file mode 100644
index 000000000..cc73b3a96
--- /dev/null
+++ b/doc/using/pyGHDL/libghdl.rst
@@ -0,0 +1,49 @@
+libghdl
+=======
+
+.. automodule:: libghdl
+
+libghdl.errorout
+----------------
+
+.. automodule:: libghdl.errorout
+
+libghdl.errorout_console
+------------------------
+
+.. automodule:: libghdl.errorout_console
+
+libghdl.errorout_memory
+-----------------------
+
+.. automodule:: libghdl.errorout_memory
+
+libghdl.files_map
+-----------------
+
+.. automodule:: libghdl.files_map
+
+libghdl.files_map_editor
+------------------------
+
+.. automodule:: libghdl.files_map_editor
+
+libghdl.flags
+-------------
+
+.. automodule:: libghdl.flags
+
+libghdl.libraries
+-----------------
+
+.. automodule:: libghdl.libraries
+
+libghdl.name_table
+------------------
+
+.. automodule:: libghdl.name_table
+
+libghdl.std_names
+-----------------
+
+.. automodule:: libghdl.std_names
diff --git a/doc/using/pyGHDL/utils.rst b/doc/using/pyGHDL/utils.rst
new file mode 100644
index 000000000..682cb198b
--- /dev/null
+++ b/doc/using/pyGHDL/utils.rst
@@ -0,0 +1,4 @@
+libghdl.utils
+===============
+
+.. automodule:: libghdl.utils
diff --git a/doc/using/pyGHDL/vhdl.rst b/doc/using/pyGHDL/vhdl.rst
new file mode 100644
index 000000000..a18538011
--- /dev/null
+++ b/doc/using/pyGHDL/vhdl.rst
@@ -0,0 +1,79 @@
+libghdl.vhdl
+============
+
+.. automodule:: libghdl.vhdl
+
+libghdl.vhdl.canon
+------------------
+
+.. automodule:: libghdl.vhdl.canon
+
+libghdl.vhdl.elocations
+-----------------------
+
+.. automodule:: libghdl.vhdl.elocations
+
+libghdl.vhdl.flists
+-------------------
+
+.. automodule:: libghdl.vhdl.flists
+
+libghdl.vhdl.formatters
+-----------------------
+
+.. automodule:: libghdl.vhdl.formatters
+
+libghdl.vhdl.ieee
+-----------------
+
+.. automodule:: libghdl.vhdl.ieee
+
+libghdl.vhdl.lists
+------------------
+
+.. automodule:: libghdl.vhdl.lists
+
+libghdl.vhdl.nodes
+------------------
+
+.. automodule:: libghdl.vhdl.nodes
+
+libghdl.vhdl.nodes_meta
+-----------------------
+
+.. automodule:: libghdl.vhdl.nodes_meta
+
+libghdl.vhdl.nodes_utils
+------------------------
+
+.. automodule:: libghdl.vhdl.nodes_utils
+
+libghdl.vhdl.parse
+------------------
+
+.. automodule:: libghdl.vhdl.parse
+
+libghdl.vhdl.scanner
+--------------------
+
+.. automodule:: libghdl.vhdl.scanner
+
+libghdl.vhdl.sem
+----------------
+
+.. automodule:: libghdl.vhdl.sem
+
+libghdl.vhdl.sem_lib
+--------------------
+
+.. automodule:: libghdl.vhdl.sem_lib
+
+libghdl.vhdl.std_package
+------------------------
+
+.. automodule:: libghdl.vhdl.std_package
+
+libghdl.vhdl.tokens
+-------------------
+
+.. automodule:: libghdl.vhdl.tokens
diff --git a/pyGHDL/README.md b/pyGHDL/README.md
new file mode 100644
index 000000000..81afcc1cb
--- /dev/null
+++ b/pyGHDL/README.md
@@ -0,0 +1,11 @@
+# pyGHDL
+
+Python binding for GHDL and high-level APIs.
+
+## Provided Packages
+
+* `pyGHDL.cli` - Command line interface tools.
+* `pyGHDL.dom` - Document Object Model (DOM) for VHDL parsed by `libghdl`.
+* `pyGHDL.libghdl` - Low-level Python bindings to GHDL's `libghdl` shared library.
+ Auto generated API from Ada sources.
+* `pyGHDL.lsp` - Language Server Protocol (LSP) implementation for VHDL.
diff --git a/python/libghdl/thin/__init__.py b/pyGHDL/__init__.py
index e69de29bb..e69de29bb 100644
--- a/python/libghdl/thin/__init__.py
+++ b/pyGHDL/__init__.py
diff --git a/python/libghdl/thin/vhdl/__init__.py b/pyGHDL/cli/__init__.py
index e69de29bb..e69de29bb 100644
--- a/python/libghdl/thin/vhdl/__init__.py
+++ b/pyGHDL/cli/__init__.py
diff --git a/python/vhdl_langserver/main.py b/pyGHDL/cli/ghdl-ls
index 5fe0e0549..33949fa67 100644
--- a/python/vhdl_langserver/main.py
+++ b/pyGHDL/cli/ghdl-ls
@@ -6,41 +6,15 @@ import logging
import sys
import os
-import libghdl
-import libghdl.thin.errorout_console
-
-from . import version
-from . import lsp
-from . import vhdl_ls
+import pyGHDL.libghdl as libghdl
+from pyGHDL.libghdl import version, errorout_console
+from pyGHDL.lsp import LSPConnTrace
+from pyGHDL.lsp.lsp import LSPConn, LanguageProtocolServer
+from pyGHDL.lsp.vhdl_ls import VhdlLanguageServer
logger = logging.getLogger("ghdl-ls")
-class LSPConnTrace(object):
- """Wrapper class to save in and out packets"""
-
- def __init__(self, basename, conn):
- self.conn = conn
- self.trace_in = open(basename + ".in", "w")
- self.trace_out = open(basename + ".out", "w")
-
- def readline(self):
- res = self.conn.readline()
- self.trace_in.write(res)
- return res
-
- def read(self, size):
- res = self.conn.read(size)
- self.trace_in.write(res)
- self.trace_in.flush()
- return res
-
- def write(self, out):
- self.conn.write(out)
- self.trace_out.write(out)
- self.trace_out.flush()
-
-
def rotate_log_files(basename, num):
for i in range(num, 0, -1):
oldfile = "{}.{}".format(basename, i - 1)
@@ -72,7 +46,7 @@ def main():
args = parser.parse_args()
if args.disp_config:
- libghdl.thin.errorout_console.Install_Handler()
+ errorout_console.Install_Handler()
libghdl.disp_config()
return
@@ -107,7 +81,7 @@ def main():
if args.input is not None:
instream = open(args.input, "rb")
- conn = lsp.LSPConn(instream, sys.stdout.buffer)
+ conn = LSPConn(instream, sys.stdout.buffer)
trace_file = args.trace_file
if trace_file is None:
@@ -120,11 +94,14 @@ def main():
else:
logger.info("Traces disabled when -i/--input")
- handler = vhdl_ls.VhdlLanguageServer()
+ handler = VhdlLanguageServer()
try:
- server = lsp.LanguageProtocolServer(handler, conn)
+ server = LanguageProtocolServer(handler, conn)
server.run()
except Exception:
logger.exception("Uncaught error")
sys.exit(1)
+
+if __name__ == '__main__':
+ main()
diff --git a/pyGHDL/dom/Common.py b/pyGHDL/dom/Common.py
new file mode 100644
index 000000000..0cd41c99e
--- /dev/null
+++ b/pyGHDL/dom/Common.py
@@ -0,0 +1,48 @@
+from pydecor import export
+
+from pyVHDLModel.VHDLModel import Modes
+
+from pyGHDL.libghdl import name_table
+from pyGHDL.libghdl.vhdl import nodes
+
+__all__ = []
+__api__ = __all__
+
+
+@export
+class GHDLBaseException(Exception):
+ pass
+
+
+@export
+class LibGHDLException(GHDLBaseException):
+ pass
+
+
+@export
+class GHDLException(GHDLBaseException):
+ pass
+
+
+@export
+class GHDLMixin:
+ _MODE_TRANSLATION = {
+ nodes.Iir_Mode.In_Mode: Modes.In,
+ nodes.Iir_Mode.Out_Mode: Modes.Out,
+ nodes.Iir_Mode.Inout_Mode: Modes.InOut,
+ nodes.Iir_Mode.Buffer_Mode: Modes.Buffer,
+ nodes.Iir_Mode.Linkage_Mode: Modes.Linkage
+ }
+
+ @classmethod
+ def _ghdlNodeToName(cls, node):
+ """Return the python string from node :param:`node` identifier"""
+ return name_table.Get_Name_Ptr(nodes.Get_Identifier(node)).decode("utf-8")
+
+ @classmethod
+ def _ghdlPortToMode(cls, port):
+ """Return the mode of a port."""
+ try:
+ return cls._MODE_TRANSLATION[nodes.Get_Mode(port)]
+ except KeyError:
+ raise LibGHDLException("Unknown mode.")
diff --git a/pyGHDL/dom/DesignUnit.py b/pyGHDL/dom/DesignUnit.py
new file mode 100644
index 000000000..3e87bb41a
--- /dev/null
+++ b/pyGHDL/dom/DesignUnit.py
@@ -0,0 +1,101 @@
+from pydecor import export
+
+from pyVHDLModel.VHDLModel import Entity as VHDLModel_Entity
+from pyVHDLModel.VHDLModel import Architecture as VHDLModel_Architecture
+from pyVHDLModel.VHDLModel import Package as VHDLModel_Package
+from pyVHDLModel.VHDLModel import PackageBody as VHDLModel_PackageBody
+from pyVHDLModel.VHDLModel import Context as VHDLModel_Context
+from pyVHDLModel.VHDLModel import Configuration as VHDLModel_Configuration
+
+from pyGHDL.libghdl.vhdl import nodes
+import pyGHDL.libghdl.utils as pyutils
+
+from pyGHDL.dom.Common import GHDLMixin
+
+__all__ = []
+__api__ = __all__
+
+from pyGHDL.dom.InterfaceItem import GenericConstantInterfaceItem, PortSignalInterfaceItem
+
+
+@export
+class Entity(VHDLModel_Entity, GHDLMixin):
+
+ @classmethod
+ def parse(cls, libraryUnit):
+ name = cls._ghdlNodeToName(libraryUnit)
+ entity = cls(name)
+
+ cls.__parseGenerics(libraryUnit, entity)
+ cls.__parsePorts(libraryUnit, entity)
+
+ return entity
+
+ @classmethod
+ def __ghdlGetGenerics(cls, entity):
+ return pyutils.chain_iter(nodes.Get_Generic_Chain(entity))
+
+ @classmethod
+ def __ghdlGetPorts(cls, entity):
+ return pyutils.chain_iter(nodes.Get_Port_Chain(entity))
+
+ @classmethod
+ def __parseGenerics(cls, libraryUnit, entity):
+ for generic in cls.__ghdlGetGenerics(libraryUnit):
+ genericConstant = GenericConstantInterfaceItem.parse(generic)
+ entity.GenericItems.append(genericConstant)
+
+ @classmethod
+ def __parsePorts(cls, libraryUnit, entity):
+ for port in cls.__ghdlGetPorts(libraryUnit):
+ signalPort = PortSignalInterfaceItem.parse(port)
+ entity.PortItems.append(signalPort)
+
+@export
+class Architecture(VHDLModel_Architecture, GHDLMixin):
+ def __init__(self, name: str, entityName: str):
+ super().__init__(name)
+
+ self.__entityName = entityName
+
+ @classmethod
+ def parse(cls, libraryUnit):
+ name = cls._ghdlNodeToName(libraryUnit)
+ entityName = cls._ghdlNodeToName(nodes.Get_Entity_Name(libraryUnit))
+
+ return cls(name, entityName)
+
+ def resolve(self):
+ pass
+
+@export
+class Package(VHDLModel_Package, GHDLMixin):
+
+ @classmethod
+ def parse(cls, libraryUnit):
+ name = cls._ghdlNodeToName(libraryUnit)
+ return cls(name)
+
+@export
+class PackageBody(VHDLModel_PackageBody, GHDLMixin):
+
+ @classmethod
+ def parse(cls, libraryUnit):
+ name = cls._ghdlNodeToName(libraryUnit)
+ return cls(name)
+
+@export
+class Context(VHDLModel_Context, GHDLMixin):
+
+ @classmethod
+ def parse(cls, libraryUnit):
+ name = cls._ghdlNodeToName(libraryUnit)
+ return cls(name)
+
+@export
+class Configuration(VHDLModel_Configuration, GHDLMixin):
+
+ @classmethod
+ def parse(cls, libraryUnit):
+ name = cls._ghdlNodeToName(libraryUnit)
+ return cls(name)
diff --git a/pyGHDL/dom/InterfaceItem.py b/pyGHDL/dom/InterfaceItem.py
new file mode 100644
index 000000000..0833c2547
--- /dev/null
+++ b/pyGHDL/dom/InterfaceItem.py
@@ -0,0 +1,33 @@
+from pydecor import export
+
+from pyVHDLModel.VHDLModel import PortSignalInterfaceItem as VHDLModel_PortSignalInterfaceItem
+from pyVHDLModel.VHDLModel import GenericConstantInterfaceItem as VHDLModel_GenericConstantInterfaceItem
+
+from pyGHDL.dom.Common import GHDLMixin
+
+__all__ = []
+__api__ = __all__
+
+
+@export
+class GenericConstantInterfaceItem(VHDLModel_GenericConstantInterfaceItem, GHDLMixin):
+ @classmethod
+ def parse(cls, generic):
+ name = cls._ghdlNodeToName(generic)
+ mode = cls._ghdlPortToMode(generic)
+
+ generic = cls(name, mode)
+
+ return generic
+
+
+@export
+class PortSignalInterfaceItem(VHDLModel_PortSignalInterfaceItem, GHDLMixin):
+ @classmethod
+ def parse(cls, port):
+ name = cls._ghdlNodeToName(port)
+ mode = cls._ghdlPortToMode(port)
+
+ port = cls(name, mode)
+
+ return port
diff --git a/pyGHDL/dom/Misc.py b/pyGHDL/dom/Misc.py
new file mode 100644
index 000000000..df1ab4cce
--- /dev/null
+++ b/pyGHDL/dom/Misc.py
@@ -0,0 +1,101 @@
+from pathlib import Path
+from typing import Any
+
+from pydecor import export
+
+from pyVHDLModel.VHDLModel import Design as VHDLModel_Design
+from pyVHDLModel.VHDLModel import Library as VHDLModel_Library
+from pyVHDLModel.VHDLModel import Document as VHDLModel_Document
+
+import pyGHDL.libghdl as libghdl
+from pyGHDL.libghdl import name_table, files_map, errorout_memory
+from pyGHDL.libghdl.vhdl import nodes, sem_lib
+
+from pyGHDL.dom.Common import LibGHDLException, GHDLException
+from pyGHDL.dom.DesignUnit import Entity, Architecture, Package, PackageBody, Context, Configuration
+
+__all__ = []
+__api__ = __all__
+
+
+@export
+class Design(VHDLModel_Design):
+ def __init__(self):
+ super().__init__()
+
+ self.__ghdl_init()
+
+ def __ghdl_init(self):
+ """Initialization: set options and then load libraries"""
+
+ # Collect error messages in memory
+ errorout_memory.Install_Handler()
+
+ libghdl.set_option(b"--std=08")
+
+ # Finish initialization. This will load the standard package.
+ if libghdl.analyze_init_status() != 0:
+ raise LibGHDLException("Error initializing 'libghdl'.")
+
+@export
+class Library(VHDLModel_Library):
+ pass
+
+
+@export
+class Document(VHDLModel_Document):
+ __ghdlFileID: Any
+ __ghdlSourceFileEntry: Any
+ __ghdlFile: Any
+
+ def __init__(self, path : Path = None, dontParse: bool = False):
+ super().__init__(path)
+
+ self.__ghdl_init()
+ if (dontParse == False):
+ self.parse()
+
+ def __ghdl_init(self):
+ # Read input file
+ self.__ghdlFileID = name_table.Get_Identifier(str(self.Path).encode("utf_8"))
+ self.__ghdlSourceFileEntry = files_map.Read_Source_File(name_table.Null_Identifier, self.__ghdlFileID)
+ if self.__ghdlSourceFileEntry == files_map.No_Source_File_Entry:
+ raise LibGHDLException("Cannot load file '{!s}'".format(self.Path))
+
+ # parse
+ self.__ghdlFile = sem_lib.Load_File(self.__ghdlSourceFileEntry)
+
+ def parse(self):
+ unit = nodes.Get_First_Design_Unit(self.__ghdlFile)
+ while unit != nodes.Null_Iir:
+ libraryUnit = nodes.Get_Library_Unit(unit)
+ nodeKind = nodes.Get_Kind(libraryUnit)
+
+ if (nodeKind == nodes.Iir_Kind.Entity_Declaration):
+ entity = Entity.parse(libraryUnit)
+ self.Entities.append(entity)
+
+ elif (nodeKind == nodes.Iir_Kind.Architecture_Body):
+ architecture = Architecture.parse(libraryUnit)
+ self.Architectures.append(architecture)
+
+ elif (nodeKind == nodes.Iir_Kind.Package_Declaration):
+ package = Package.parse(libraryUnit)
+ self.Packages.append(package)
+
+ elif (nodeKind == nodes.Iir_Kind.Package_Body):
+ packageBody = PackageBody.parse(libraryUnit)
+ self.PackageBodies.append(packageBody)
+
+ elif (nodeKind == nodes.Iir_Kind.Context_Declaration):
+ context = Context.parse(libraryUnit)
+ self.Contexts.append(context)
+
+ elif (nodeKind == nodes.Iir_Kind.Configuration_Declaration):
+ configuration = Configuration.parse(libraryUnit)
+ self.Configurations.append(configuration)
+
+ else:
+ raise GHDLException("Unknown design unit kind.")
+
+ unit = nodes.Get_Chain(unit)
diff --git a/pyGHDL/dom/__init__.py b/pyGHDL/dom/__init__.py
new file mode 100644
index 000000000..df2dfb868
--- /dev/null
+++ b/pyGHDL/dom/__init__.py
@@ -0,0 +1,4 @@
+from pydecor import export
+
+__all__ = []
+__api__ = __all__
diff --git a/python/libghdl/__init__.py b/pyGHDL/libghdl/__init__.py
index 4ba7b6b26..da39a4475 100644
--- a/python/libghdl/__init__.py
+++ b/pyGHDL/libghdl/__init__.py
@@ -3,7 +3,7 @@ import os
import sys
from os.path import dirname, join, exists, normpath
from shutil import which
-from libghdl.version import __version__
+from pyGHDL.libghdl.version import __version__
def _to_char_p(arg):
diff --git a/python/libghdl/thin/errorout.py b/pyGHDL/libghdl/errorout.py
index af0da5fc6..5819970b5 100644
--- a/python/libghdl/thin/errorout.py
+++ b/pyGHDL/libghdl/errorout.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
Enable_Warning = libghdl.errorout__enable_warning
diff --git a/python/libghdl/thin/errorout_console.py b/pyGHDL/libghdl/errorout_console.py
index 877165b70..8862b92ec 100644
--- a/python/libghdl/thin/errorout_console.py
+++ b/pyGHDL/libghdl/errorout_console.py
@@ -1,3 +1,3 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
Install_Handler = libghdl.errorout__console__install_handler
diff --git a/python/libghdl/thin/errorout_memory.py b/pyGHDL/libghdl/errorout_memory.py
index f236f1075..9dc283f75 100644
--- a/python/libghdl/thin/errorout_memory.py
+++ b/pyGHDL/libghdl/errorout_memory.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int8, c_int32, c_char_p, Structure
diff --git a/python/libghdl/thin/files_map.py b/pyGHDL/libghdl/files_map.py
index d27209e7a..ef1cf55ca 100644
--- a/python/libghdl/thin/files_map.py
+++ b/pyGHDL/libghdl/files_map.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_void_p
EOT = b"\x04"
diff --git a/python/libghdl/thin/files_map_editor.py b/pyGHDL/libghdl/files_map_editor.py
index bf9492786..e258dd047 100644
--- a/python/libghdl/thin/files_map_editor.py
+++ b/pyGHDL/libghdl/files_map_editor.py
@@ -1,5 +1,5 @@
+from pyGHDL.libghdl import libghdl
from ctypes import c_int32, c_char_p, c_bool
-from libghdl import libghdl
Replace_Text = libghdl.files_map__editor__replace_text_ptr
Replace_Text.argstype = [c_int32, c_int32, c_int32, c_int32, c_char_p, c_int32]
diff --git a/python/libghdl/thin/flags.py b/pyGHDL/libghdl/flags.py
index 3a82950a0..22f5925cc 100644
--- a/python/libghdl/thin/flags.py
+++ b/pyGHDL/libghdl/flags.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_bool, sizeof
assert sizeof(c_bool) == 1
diff --git a/python/libghdl/thin/libraries.py b/pyGHDL/libghdl/libraries.py
index 625f7fdd1..5dbb89804 100644
--- a/python/libghdl/thin/libraries.py
+++ b/pyGHDL/libghdl/libraries.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int32
Get_Libraries_Chain = libghdl.libraries__get_libraries_chain
diff --git a/python/libghdl/thin/name_table.py b/pyGHDL/libghdl/name_table.py
index c41973ec1..6d2d1a3f3 100644
--- a/python/libghdl/thin/name_table.py
+++ b/pyGHDL/libghdl/name_table.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_char_p
Get_Name_Length = libghdl.name_table__get_name_length
diff --git a/python/libghdl/thin/std_names.py b/pyGHDL/libghdl/std_names.py
index 540d37c33..540d37c33 100644
--- a/python/libghdl/thin/std_names.py
+++ b/pyGHDL/libghdl/std_names.py
diff --git a/python/libghdl/thin/vhdl/pyutils.py b/pyGHDL/libghdl/utils/__init__.py
index ba041d323..a8e0d4f3f 100644
--- a/python/libghdl/thin/vhdl/pyutils.py
+++ b/pyGHDL/libghdl/utils/__init__.py
@@ -1,10 +1,10 @@
from ctypes import c_char_p, c_int32, c_int, c_bool, sizeof, c_void_p, byref
-import libghdl.thin.name_table as name_table
-import libghdl.thin.vhdl.nodes as nodes
-import libghdl.thin.vhdl.nodes_meta as nodes_meta
-import libghdl.thin.vhdl.lists as lists
-import libghdl.thin.vhdl.flists as flists
-from libghdl.thin.vhdl.nodes_meta import Attr, types
+import pyGHDL.libghdl.name_table as name_table
+import pyGHDL.libghdl.vhdl.nodes as nodes
+import pyGHDL.libghdl.vhdl.nodes_meta as nodes_meta
+import pyGHDL.libghdl.vhdl.lists as lists
+import pyGHDL.libghdl.vhdl.flists as flists
+from pyGHDL.libghdl.vhdl.nodes_meta import Attr, types
def name_image(nameid):
diff --git a/python/libghdl/version.py b/pyGHDL/libghdl/version.py
index fcc6d13d8..fcc6d13d8 100644
--- a/python/libghdl/version.py
+++ b/pyGHDL/libghdl/version.py
diff --git a/python/vhdl_langserver/__init__.py b/pyGHDL/libghdl/vhdl/__init__.py
index e69de29bb..e69de29bb 100644
--- a/python/vhdl_langserver/__init__.py
+++ b/pyGHDL/libghdl/vhdl/__init__.py
diff --git a/python/libghdl/thin/vhdl/canon.py b/pyGHDL/libghdl/vhdl/canon.py
index 7893cf3ff..97eea62e1 100644
--- a/python/libghdl/thin/vhdl/canon.py
+++ b/pyGHDL/libghdl/vhdl/canon.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_bool
+
Flag_Concurrent_Stmts = c_bool.in_dll(
libghdl, "vhdl__canon__canon_flag_concurrent_stmts"
)
diff --git a/python/libghdl/thin/vhdl/elocations.py b/pyGHDL/libghdl/vhdl/elocations.py
index 87d87b731..bd76d47a3 100644
--- a/python/libghdl/thin/vhdl/elocations.py
+++ b/pyGHDL/libghdl/vhdl/elocations.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
Get_Start_Location = libghdl.vhdl__elocations__get_start_location
diff --git a/python/libghdl/thin/vhdl/flists.py b/pyGHDL/libghdl/vhdl/flists.py
index 6cdd39ff3..96bac53d5 100644
--- a/python/libghdl/thin/vhdl/flists.py
+++ b/pyGHDL/libghdl/vhdl/flists.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int32
+
Flist_Type = c_int32
Ffirst = 0
diff --git a/python/libghdl/thin/vhdl/formatters.py b/pyGHDL/libghdl/vhdl/formatters.py
index 9c8bf9afb..4b1f68fec 100644
--- a/python/libghdl/thin/vhdl/formatters.py
+++ b/pyGHDL/libghdl/vhdl/formatters.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int32, c_char_p
+
Indent_String = libghdl.vhdl__formatters__indent_string
Allocate_Handle = libghdl.vhdl__formatters__allocate_handle
diff --git a/python/libghdl/thin/vhdl/ieee.py b/pyGHDL/libghdl/vhdl/ieee.py
index 35db1a631..0010e5c5a 100644
--- a/python/libghdl/thin/vhdl/ieee.py
+++ b/pyGHDL/libghdl/vhdl/ieee.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int
+
Std_Logic_1164_Pkg = c_int.in_dll(
libghdl, "vhdl__ieee__std_logic_1164__std_logic_1164_pkg"
)
diff --git a/python/libghdl/thin/vhdl/lists.py b/pyGHDL/libghdl/vhdl/lists.py
index bcaecb89b..4c4f98579 100644
--- a/python/libghdl/thin/vhdl/lists.py
+++ b/pyGHDL/libghdl/vhdl/lists.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int32, c_bool, POINTER, Structure
+
List_Type = c_int32
diff --git a/python/libghdl/thin/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py
index e7f47b16f..fb18151f7 100644
--- a/python/libghdl/thin/vhdl/nodes.py
+++ b/pyGHDL/libghdl/vhdl/nodes.py
@@ -1,4 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
Null_Iir = 0
@@ -10,6 +10,7 @@ Iir_Flist_Others = 1
Iir_Flist_All = 2
+
class Iir_Kind:
Unused = 0
Error = 1
@@ -329,30 +330,6 @@ class Iir_Kind:
class Iir_Kinds:
- Variable_Assignment_Statement = [
- Iir_Kind.Variable_Assignment_Statement,
- Iir_Kind.Conditional_Variable_Assignment_Statement,
- ]
-
- Denoting_Name = [
- Iir_Kind.Character_Literal,
- Iir_Kind.Simple_Name,
- Iir_Kind.Selected_Name,
- Iir_Kind.Operator_Symbol,
- Iir_Kind.Reference_Name,
- ]
-
- Case_Choice = [
- Iir_Kind.Choice_By_Range,
- Iir_Kind.Choice_By_Expression,
- Iir_Kind.Choice_By_Others,
- ]
-
- Array_Type_Definition = [
- Iir_Kind.Array_Type_Definition,
- Iir_Kind.Array_Subtype_Definition,
- ]
-
Library_Unit = [
Iir_Kind.Entity_Declaration,
Iir_Kind.Configuration_Declaration,
@@ -366,33 +343,31 @@ class Iir_Kinds:
Iir_Kind.Architecture_Body,
]
- Array_Choice = [
- Iir_Kind.Choice_By_Range,
- Iir_Kind.Choice_By_Expression,
- Iir_Kind.Choice_By_Others,
- Iir_Kind.Choice_By_None,
- ]
-
- Subprogram_Declaration = [
- Iir_Kind.Function_Declaration,
- Iir_Kind.Procedure_Declaration,
+ Primary_Unit = [
+ Iir_Kind.Entity_Declaration,
+ Iir_Kind.Configuration_Declaration,
+ Iir_Kind.Context_Declaration,
+ Iir_Kind.Package_Declaration,
+ Iir_Kind.Package_Instantiation_Declaration,
+ Iir_Kind.Vmode_Declaration,
+ Iir_Kind.Vprop_Declaration,
+ Iir_Kind.Vunit_Declaration,
]
- Subtype_Attribute = [
- Iir_Kind.Base_Attribute,
- Iir_Kind.Subtype_Attribute,
- Iir_Kind.Element_Attribute,
+ Secondary_Unit = [
+ Iir_Kind.Package_Body,
+ Iir_Kind.Architecture_Body,
]
- Scalar_Subtype_Definition = [
- Iir_Kind.Physical_Subtype_Definition,
- Iir_Kind.Floating_Subtype_Definition,
- Iir_Kind.Integer_Subtype_Definition,
- Iir_Kind.Enumeration_Subtype_Definition,
+ Package_Declaration = [
+ Iir_Kind.Package_Declaration,
+ Iir_Kind.Package_Instantiation_Declaration,
]
- Subnature_Definition = [
- Iir_Kind.Array_Subnature_Definition,
+ Verification_Unit = [
+ Iir_Kind.Vmode_Declaration,
+ Iir_Kind.Vprop_Declaration,
+ Iir_Kind.Vunit_Declaration,
]
Literal = [
@@ -404,48 +379,14 @@ class Iir_Kinds:
Iir_Kind.Physical_Fp_Literal,
]
- Nature_Indication = [
- Iir_Kind.Scalar_Nature_Definition,
- Iir_Kind.Record_Nature_Definition,
- Iir_Kind.Array_Nature_Definition,
- Iir_Kind.Array_Subnature_Definition,
- ]
-
- Process_Statement = [
- Iir_Kind.Sensitized_Process_Statement,
- Iir_Kind.Process_Statement,
- ]
-
- Nature_Definition = [
- Iir_Kind.Scalar_Nature_Definition,
- Iir_Kind.Record_Nature_Definition,
- Iir_Kind.Array_Nature_Definition,
- ]
-
- Object_Declaration = [
- Iir_Kind.Object_Alias_Declaration,
- Iir_Kind.Free_Quantity_Declaration,
- Iir_Kind.Spectrum_Quantity_Declaration,
- Iir_Kind.Noise_Quantity_Declaration,
- Iir_Kind.Across_Quantity_Declaration,
- Iir_Kind.Through_Quantity_Declaration,
- Iir_Kind.File_Declaration,
- Iir_Kind.Guard_Signal_Declaration,
- Iir_Kind.Signal_Declaration,
- Iir_Kind.Variable_Declaration,
- Iir_Kind.Constant_Declaration,
- Iir_Kind.Iterator_Declaration,
- Iir_Kind.Interface_Constant_Declaration,
- Iir_Kind.Interface_Variable_Declaration,
- Iir_Kind.Interface_Signal_Declaration,
- Iir_Kind.Interface_File_Declaration,
- Iir_Kind.Interface_Quantity_Declaration,
+ Physical_Literal = [
+ Iir_Kind.Physical_Int_Literal,
+ Iir_Kind.Physical_Fp_Literal,
]
- Clause = [
- Iir_Kind.Library_Clause,
- Iir_Kind.Use_Clause,
- Iir_Kind.Context_Reference,
+ Array_Type_Definition = [
+ Iir_Kind.Array_Type_Definition,
+ Iir_Kind.Array_Subtype_Definition,
]
Type_And_Subtype_Definition = [
@@ -469,66 +410,54 @@ class Iir_Kinds:
Iir_Kind.Physical_Type_Definition,
]
- External_Name = [
- Iir_Kind.External_Constant_Name,
- Iir_Kind.External_Signal_Name,
- Iir_Kind.External_Variable_Name,
- ]
-
- Dereference = [
- Iir_Kind.Dereference,
- Iir_Kind.Implicit_Dereference,
- ]
-
- Primary_Unit = [
- Iir_Kind.Entity_Declaration,
- Iir_Kind.Configuration_Declaration,
- Iir_Kind.Context_Declaration,
- Iir_Kind.Package_Declaration,
- Iir_Kind.Package_Instantiation_Declaration,
- Iir_Kind.Vmode_Declaration,
- Iir_Kind.Vprop_Declaration,
- Iir_Kind.Vunit_Declaration,
- ]
-
- Record_Choice = [
- Iir_Kind.Choice_By_Others,
- Iir_Kind.Choice_By_None,
- Iir_Kind.Choice_By_Name,
- ]
-
- Functions_And_Literals = [
- Iir_Kind.Enumeration_Literal,
- Iir_Kind.Function_Declaration,
+ Subtype_Definition = [
+ Iir_Kind.Array_Subtype_Definition,
+ Iir_Kind.Record_Subtype_Definition,
+ Iir_Kind.Access_Subtype_Definition,
+ Iir_Kind.Physical_Subtype_Definition,
+ Iir_Kind.Floating_Subtype_Definition,
+ Iir_Kind.Integer_Subtype_Definition,
+ Iir_Kind.Enumeration_Subtype_Definition,
]
- Verification_Unit = [
- Iir_Kind.Vmode_Declaration,
- Iir_Kind.Vprop_Declaration,
- Iir_Kind.Vunit_Declaration,
+ Scalar_Subtype_Definition = [
+ Iir_Kind.Physical_Subtype_Definition,
+ Iir_Kind.Floating_Subtype_Definition,
+ Iir_Kind.Integer_Subtype_Definition,
+ Iir_Kind.Enumeration_Subtype_Definition,
]
- Secondary_Unit = [
- Iir_Kind.Package_Body,
- Iir_Kind.Architecture_Body,
+ Scalar_Type_And_Subtype_Definition = [
+ Iir_Kind.Physical_Subtype_Definition,
+ Iir_Kind.Floating_Subtype_Definition,
+ Iir_Kind.Integer_Subtype_Definition,
+ Iir_Kind.Enumeration_Subtype_Definition,
+ Iir_Kind.Enumeration_Type_Definition,
+ Iir_Kind.Integer_Type_Definition,
+ Iir_Kind.Floating_Type_Definition,
+ Iir_Kind.Physical_Type_Definition,
]
- Package_Declaration = [
- Iir_Kind.Package_Declaration,
- Iir_Kind.Package_Instantiation_Declaration,
+ Range_Type_Definition = [
+ Iir_Kind.Physical_Subtype_Definition,
+ Iir_Kind.Floating_Subtype_Definition,
+ Iir_Kind.Integer_Subtype_Definition,
+ Iir_Kind.Enumeration_Subtype_Definition,
+ Iir_Kind.Enumeration_Type_Definition,
]
- Psl_Builtin = [
- Iir_Kind.Psl_Prev,
- Iir_Kind.Psl_Stable,
- Iir_Kind.Psl_Rose,
- Iir_Kind.Psl_Fell,
+ Discrete_Type_Definition = [
+ Iir_Kind.Integer_Subtype_Definition,
+ Iir_Kind.Enumeration_Subtype_Definition,
+ Iir_Kind.Enumeration_Type_Definition,
+ Iir_Kind.Integer_Type_Definition,
]
- Generate_Statement = [
- Iir_Kind.If_Generate_Statement,
- Iir_Kind.Case_Generate_Statement,
- Iir_Kind.For_Generate_Statement,
+ Composite_Type_Definition = [
+ Iir_Kind.Record_Type_Definition,
+ Iir_Kind.Array_Type_Definition,
+ Iir_Kind.Array_Subtype_Definition,
+ Iir_Kind.Record_Subtype_Definition,
]
Composite_Subtype_Definition = [
@@ -536,68 +465,59 @@ class Iir_Kinds:
Iir_Kind.Record_Subtype_Definition,
]
- Choice = [
- Iir_Kind.Choice_By_Range,
- Iir_Kind.Choice_By_Expression,
- Iir_Kind.Choice_By_Others,
- Iir_Kind.Choice_By_None,
- Iir_Kind.Choice_By_Name,
- ]
-
- If_Case_Generate_Statement = [
- Iir_Kind.If_Generate_Statement,
- Iir_Kind.Case_Generate_Statement,
- ]
-
- Simple_Concurrent_Statement = [
- Iir_Kind.Sensitized_Process_Statement,
- Iir_Kind.Process_Statement,
- Iir_Kind.Concurrent_Simple_Signal_Assignment,
- Iir_Kind.Concurrent_Conditional_Signal_Assignment,
- Iir_Kind.Concurrent_Selected_Signal_Assignment,
- Iir_Kind.Concurrent_Assertion_Statement,
- Iir_Kind.Concurrent_Procedure_Call_Statement,
- Iir_Kind.Concurrent_Break_Statement,
- Iir_Kind.Psl_Assert_Directive,
- Iir_Kind.Psl_Assume_Directive,
- Iir_Kind.Psl_Cover_Directive,
- Iir_Kind.Psl_Restrict_Directive,
+ Type_Declaration = [
+ Iir_Kind.Type_Declaration,
+ Iir_Kind.Anonymous_Type_Declaration,
+ Iir_Kind.Subtype_Declaration,
]
- Non_Alias_Object_Declaration = [
- Iir_Kind.File_Declaration,
- Iir_Kind.Guard_Signal_Declaration,
- Iir_Kind.Signal_Declaration,
- Iir_Kind.Variable_Declaration,
- Iir_Kind.Constant_Declaration,
- Iir_Kind.Iterator_Declaration,
- Iir_Kind.Interface_Constant_Declaration,
- Iir_Kind.Interface_Variable_Declaration,
- Iir_Kind.Interface_Signal_Declaration,
- Iir_Kind.Interface_File_Declaration,
+ Nature_Definition = [
+ Iir_Kind.Scalar_Nature_Definition,
+ Iir_Kind.Record_Nature_Definition,
+ Iir_Kind.Array_Nature_Definition,
]
- Entity_Aspect = [
- Iir_Kind.Entity_Aspect_Entity,
- Iir_Kind.Entity_Aspect_Configuration,
- Iir_Kind.Entity_Aspect_Open,
+ Subnature_Definition = [
+ Iir_Kind.Array_Subnature_Definition,
]
- Subprogram_Body = [
- Iir_Kind.Function_Body,
- Iir_Kind.Procedure_Body,
+ Nature_Indication = [
+ Iir_Kind.Scalar_Nature_Definition,
+ Iir_Kind.Record_Nature_Definition,
+ Iir_Kind.Array_Nature_Definition,
+ Iir_Kind.Array_Subnature_Definition,
]
- Source_Quantity_Declaration = [
- Iir_Kind.Spectrum_Quantity_Declaration,
- Iir_Kind.Noise_Quantity_Declaration,
+ Nonoverloadable_Declaration = [
+ Iir_Kind.Type_Declaration,
+ Iir_Kind.Anonymous_Type_Declaration,
+ Iir_Kind.Subtype_Declaration,
+ Iir_Kind.Nature_Declaration,
+ Iir_Kind.Subnature_Declaration,
+ Iir_Kind.Package_Header,
+ Iir_Kind.Unit_Declaration,
+ Iir_Kind.Library_Declaration,
+ Iir_Kind.Component_Declaration,
+ Iir_Kind.Attribute_Declaration,
+ Iir_Kind.Group_Template_Declaration,
+ Iir_Kind.Group_Declaration,
+ Iir_Kind.Element_Declaration,
+ Iir_Kind.Nature_Element_Declaration,
]
- Specification = [
- Iir_Kind.Attribute_Specification,
- Iir_Kind.Disconnection_Specification,
- Iir_Kind.Step_Limit_Specification,
- Iir_Kind.Configuration_Specification,
+ Monadic_Operator = [
+ Iir_Kind.Identity_Operator,
+ Iir_Kind.Negation_Operator,
+ Iir_Kind.Absolute_Operator,
+ Iir_Kind.Not_Operator,
+ Iir_Kind.Implicit_Condition_Operator,
+ Iir_Kind.Condition_Operator,
+ Iir_Kind.Reduction_And_Operator,
+ Iir_Kind.Reduction_Or_Operator,
+ Iir_Kind.Reduction_Nand_Operator,
+ Iir_Kind.Reduction_Nor_Operator,
+ Iir_Kind.Reduction_Xor_Operator,
+ Iir_Kind.Reduction_Xnor_Operator,
]
Dyadic_Operator = [
@@ -635,67 +555,44 @@ class Iir_Kinds:
Iir_Kind.Exponentiation_Operator,
]
- Expression_Attribute = [
- Iir_Kind.Left_Type_Attribute,
- Iir_Kind.Right_Type_Attribute,
- Iir_Kind.High_Type_Attribute,
- Iir_Kind.Low_Type_Attribute,
- Iir_Kind.Ascending_Type_Attribute,
- Iir_Kind.Image_Attribute,
- Iir_Kind.Value_Attribute,
- Iir_Kind.Pos_Attribute,
- Iir_Kind.Val_Attribute,
- Iir_Kind.Succ_Attribute,
- Iir_Kind.Pred_Attribute,
- Iir_Kind.Leftof_Attribute,
- Iir_Kind.Rightof_Attribute,
- Iir_Kind.Signal_Slew_Attribute,
- Iir_Kind.Quantity_Slew_Attribute,
- Iir_Kind.Ramp_Attribute,
- Iir_Kind.Zoh_Attribute,
- Iir_Kind.Ltf_Attribute,
- Iir_Kind.Ztf_Attribute,
- Iir_Kind.Dot_Attribute,
- Iir_Kind.Integ_Attribute,
- Iir_Kind.Above_Attribute,
- Iir_Kind.Quantity_Delayed_Attribute,
- Iir_Kind.Delayed_Attribute,
- Iir_Kind.Stable_Attribute,
- Iir_Kind.Quiet_Attribute,
- Iir_Kind.Transaction_Attribute,
- Iir_Kind.Event_Attribute,
- Iir_Kind.Active_Attribute,
- Iir_Kind.Last_Event_Attribute,
- Iir_Kind.Last_Active_Attribute,
- Iir_Kind.Last_Value_Attribute,
- Iir_Kind.Driving_Attribute,
- Iir_Kind.Driving_Value_Attribute,
- Iir_Kind.Behavior_Attribute,
- Iir_Kind.Structure_Attribute,
- Iir_Kind.Simple_Name_Attribute,
- Iir_Kind.Instance_Name_Attribute,
- Iir_Kind.Path_Name_Attribute,
- Iir_Kind.Left_Array_Attribute,
- Iir_Kind.Right_Array_Attribute,
- Iir_Kind.High_Array_Attribute,
- Iir_Kind.Low_Array_Attribute,
- Iir_Kind.Length_Array_Attribute,
- Iir_Kind.Ascending_Array_Attribute,
+ Psl_Builtin = [
+ Iir_Kind.Psl_Prev,
+ Iir_Kind.Psl_Stable,
+ Iir_Kind.Psl_Rose,
+ Iir_Kind.Psl_Fell,
]
- Monadic_Operator = [
- Iir_Kind.Identity_Operator,
- Iir_Kind.Negation_Operator,
- Iir_Kind.Absolute_Operator,
- Iir_Kind.Not_Operator,
- Iir_Kind.Implicit_Condition_Operator,
- Iir_Kind.Condition_Operator,
- Iir_Kind.Reduction_And_Operator,
- Iir_Kind.Reduction_Or_Operator,
- Iir_Kind.Reduction_Nand_Operator,
- Iir_Kind.Reduction_Nor_Operator,
- Iir_Kind.Reduction_Xor_Operator,
- Iir_Kind.Reduction_Xnor_Operator,
+ Functions_And_Literals = [
+ Iir_Kind.Enumeration_Literal,
+ Iir_Kind.Function_Declaration,
+ ]
+
+ Subprogram_Declaration = [
+ Iir_Kind.Function_Declaration,
+ Iir_Kind.Procedure_Declaration,
+ ]
+
+ Subprogram_Body = [
+ Iir_Kind.Function_Body,
+ Iir_Kind.Procedure_Body,
+ ]
+
+ Process_Statement = [
+ Iir_Kind.Sensitized_Process_Statement,
+ Iir_Kind.Process_Statement,
+ ]
+
+ Interface_Object_Declaration = [
+ Iir_Kind.Interface_Constant_Declaration,
+ Iir_Kind.Interface_Variable_Declaration,
+ Iir_Kind.Interface_Signal_Declaration,
+ Iir_Kind.Interface_File_Declaration,
+ Iir_Kind.Interface_Quantity_Declaration,
+ ]
+
+ Interface_Subprogram_Declaration = [
+ Iir_Kind.Interface_Function_Declaration,
+ Iir_Kind.Interface_Procedure_Declaration,
]
Interface_Declaration = [
@@ -711,49 +608,55 @@ class Iir_Kinds:
Iir_Kind.Interface_Procedure_Declaration,
]
- Array_Attribute = [
- Iir_Kind.Left_Array_Attribute,
- Iir_Kind.Right_Array_Attribute,
- Iir_Kind.High_Array_Attribute,
- Iir_Kind.Low_Array_Attribute,
- Iir_Kind.Length_Array_Attribute,
- Iir_Kind.Ascending_Array_Attribute,
- Iir_Kind.Range_Array_Attribute,
- Iir_Kind.Reverse_Range_Array_Attribute,
+ Object_Declaration = [
+ Iir_Kind.Object_Alias_Declaration,
+ Iir_Kind.Free_Quantity_Declaration,
+ Iir_Kind.Spectrum_Quantity_Declaration,
+ Iir_Kind.Noise_Quantity_Declaration,
+ Iir_Kind.Across_Quantity_Declaration,
+ Iir_Kind.Through_Quantity_Declaration,
+ Iir_Kind.File_Declaration,
+ Iir_Kind.Guard_Signal_Declaration,
+ Iir_Kind.Signal_Declaration,
+ Iir_Kind.Variable_Declaration,
+ Iir_Kind.Constant_Declaration,
+ Iir_Kind.Iterator_Declaration,
+ Iir_Kind.Interface_Constant_Declaration,
+ Iir_Kind.Interface_Variable_Declaration,
+ Iir_Kind.Interface_Signal_Declaration,
+ Iir_Kind.Interface_File_Declaration,
+ Iir_Kind.Interface_Quantity_Declaration,
]
- Sequential_Statement = [
- Iir_Kind.Simple_Signal_Assignment_Statement,
- Iir_Kind.Conditional_Signal_Assignment_Statement,
- Iir_Kind.Selected_Waveform_Assignment_Statement,
- Iir_Kind.Signal_Force_Assignment_Statement,
- Iir_Kind.Signal_Release_Assignment_Statement,
- Iir_Kind.Null_Statement,
- Iir_Kind.Assertion_Statement,
- Iir_Kind.Report_Statement,
- Iir_Kind.Wait_Statement,
- Iir_Kind.Variable_Assignment_Statement,
- Iir_Kind.Conditional_Variable_Assignment_Statement,
- Iir_Kind.Return_Statement,
- Iir_Kind.For_Loop_Statement,
- Iir_Kind.While_Loop_Statement,
- Iir_Kind.Next_Statement,
- Iir_Kind.Exit_Statement,
- Iir_Kind.Case_Statement,
- Iir_Kind.Procedure_Call_Statement,
- Iir_Kind.Break_Statement,
- Iir_Kind.If_Statement,
+ Branch_Quantity_Declaration = [
+ Iir_Kind.Across_Quantity_Declaration,
+ Iir_Kind.Through_Quantity_Declaration,
]
- Denoting_And_External_Name = [
- Iir_Kind.Character_Literal,
- Iir_Kind.Simple_Name,
- Iir_Kind.Selected_Name,
- Iir_Kind.Operator_Symbol,
- Iir_Kind.Reference_Name,
- Iir_Kind.External_Constant_Name,
- Iir_Kind.External_Signal_Name,
- Iir_Kind.External_Variable_Name,
+ Source_Quantity_Declaration = [
+ Iir_Kind.Spectrum_Quantity_Declaration,
+ Iir_Kind.Noise_Quantity_Declaration,
+ ]
+
+ Quantity_Declaration = [
+ Iir_Kind.Free_Quantity_Declaration,
+ Iir_Kind.Spectrum_Quantity_Declaration,
+ Iir_Kind.Noise_Quantity_Declaration,
+ Iir_Kind.Across_Quantity_Declaration,
+ Iir_Kind.Through_Quantity_Declaration,
+ ]
+
+ Non_Alias_Object_Declaration = [
+ Iir_Kind.File_Declaration,
+ Iir_Kind.Guard_Signal_Declaration,
+ Iir_Kind.Signal_Declaration,
+ Iir_Kind.Variable_Declaration,
+ Iir_Kind.Constant_Declaration,
+ Iir_Kind.Iterator_Declaration,
+ Iir_Kind.Interface_Constant_Declaration,
+ Iir_Kind.Interface_Variable_Declaration,
+ Iir_Kind.Interface_Signal_Declaration,
+ Iir_Kind.Interface_File_Declaration,
]
Association_Element_Parameters = [
@@ -762,104 +665,120 @@ class Iir_Kinds:
Iir_Kind.Association_Element_Open,
]
- Range_Type_Definition = [
- Iir_Kind.Physical_Subtype_Definition,
- Iir_Kind.Floating_Subtype_Definition,
- Iir_Kind.Integer_Subtype_Definition,
- Iir_Kind.Enumeration_Subtype_Definition,
- Iir_Kind.Enumeration_Type_Definition,
+ Association_Element = [
+ Iir_Kind.Association_Element_By_Expression,
+ Iir_Kind.Association_Element_By_Individual,
+ Iir_Kind.Association_Element_Open,
+ Iir_Kind.Association_Element_Package,
+ Iir_Kind.Association_Element_Type,
+ Iir_Kind.Association_Element_Subprogram,
+ Iir_Kind.Association_Element_Terminal,
]
- Discrete_Type_Definition = [
- Iir_Kind.Integer_Subtype_Definition,
- Iir_Kind.Enumeration_Subtype_Definition,
- Iir_Kind.Enumeration_Type_Definition,
- Iir_Kind.Integer_Type_Definition,
+ Choice = [
+ Iir_Kind.Choice_By_Range,
+ Iir_Kind.Choice_By_Expression,
+ Iir_Kind.Choice_By_Others,
+ Iir_Kind.Choice_By_None,
+ Iir_Kind.Choice_By_Name,
]
- Concurrent_Statement = [
- Iir_Kind.Sensitized_Process_Statement,
- Iir_Kind.Process_Statement,
- Iir_Kind.Concurrent_Simple_Signal_Assignment,
- Iir_Kind.Concurrent_Conditional_Signal_Assignment,
- Iir_Kind.Concurrent_Selected_Signal_Assignment,
- Iir_Kind.Concurrent_Assertion_Statement,
- Iir_Kind.Concurrent_Procedure_Call_Statement,
- Iir_Kind.Concurrent_Break_Statement,
- Iir_Kind.Psl_Assert_Directive,
- Iir_Kind.Psl_Assume_Directive,
- Iir_Kind.Psl_Cover_Directive,
- Iir_Kind.Psl_Restrict_Directive,
- Iir_Kind.Block_Statement,
- Iir_Kind.If_Generate_Statement,
- Iir_Kind.Case_Generate_Statement,
- Iir_Kind.For_Generate_Statement,
- Iir_Kind.Component_Instantiation_Statement,
- Iir_Kind.Psl_Default_Clock,
+ Case_Choice = [
+ Iir_Kind.Choice_By_Range,
+ Iir_Kind.Choice_By_Expression,
+ Iir_Kind.Choice_By_Others,
]
- Signal_Attribute = [
- Iir_Kind.Delayed_Attribute,
- Iir_Kind.Stable_Attribute,
- Iir_Kind.Quiet_Attribute,
- Iir_Kind.Transaction_Attribute,
+ Array_Choice = [
+ Iir_Kind.Choice_By_Range,
+ Iir_Kind.Choice_By_Expression,
+ Iir_Kind.Choice_By_Others,
+ Iir_Kind.Choice_By_None,
]
- Type_Declaration = [
- Iir_Kind.Type_Declaration,
- Iir_Kind.Anonymous_Type_Declaration,
- Iir_Kind.Subtype_Declaration,
+ Record_Choice = [
+ Iir_Kind.Choice_By_Others,
+ Iir_Kind.Choice_By_None,
+ Iir_Kind.Choice_By_Name,
]
- Next_Exit_Statement = [
- Iir_Kind.Next_Statement,
- Iir_Kind.Exit_Statement,
+ Entity_Aspect = [
+ Iir_Kind.Entity_Aspect_Entity,
+ Iir_Kind.Entity_Aspect_Configuration,
+ Iir_Kind.Entity_Aspect_Open,
]
- Association_Element = [
- Iir_Kind.Association_Element_By_Expression,
- Iir_Kind.Association_Element_By_Individual,
- Iir_Kind.Association_Element_Open,
- Iir_Kind.Association_Element_Package,
- Iir_Kind.Association_Element_Type,
- Iir_Kind.Association_Element_Subprogram,
- Iir_Kind.Association_Element_Terminal,
+ Denoting_Name = [
+ Iir_Kind.Character_Literal,
+ Iir_Kind.Simple_Name,
+ Iir_Kind.Selected_Name,
+ Iir_Kind.Operator_Symbol,
+ Iir_Kind.Reference_Name,
]
- Interface_Object_Declaration = [
- Iir_Kind.Interface_Constant_Declaration,
- Iir_Kind.Interface_Variable_Declaration,
- Iir_Kind.Interface_Signal_Declaration,
- Iir_Kind.Interface_File_Declaration,
- Iir_Kind.Interface_Quantity_Declaration,
+ Denoting_And_External_Name = [
+ Iir_Kind.Character_Literal,
+ Iir_Kind.Simple_Name,
+ Iir_Kind.Selected_Name,
+ Iir_Kind.Operator_Symbol,
+ Iir_Kind.Reference_Name,
+ Iir_Kind.External_Constant_Name,
+ Iir_Kind.External_Signal_Name,
+ Iir_Kind.External_Variable_Name,
]
- Composite_Type_Definition = [
- Iir_Kind.Record_Type_Definition,
- Iir_Kind.Array_Type_Definition,
- Iir_Kind.Array_Subtype_Definition,
- Iir_Kind.Record_Subtype_Definition,
+ Name = [
+ Iir_Kind.Character_Literal,
+ Iir_Kind.Simple_Name,
+ Iir_Kind.Selected_Name,
+ Iir_Kind.Operator_Symbol,
+ Iir_Kind.Reference_Name,
+ Iir_Kind.External_Constant_Name,
+ Iir_Kind.External_Signal_Name,
+ Iir_Kind.External_Variable_Name,
+ Iir_Kind.Selected_By_All_Name,
+ Iir_Kind.Parenthesis_Name,
]
- Interface_Subprogram_Declaration = [
- Iir_Kind.Interface_Function_Declaration,
- Iir_Kind.Interface_Procedure_Declaration,
+ Dereference = [
+ Iir_Kind.Dereference,
+ Iir_Kind.Implicit_Dereference,
]
- Branch_Quantity_Declaration = [
- Iir_Kind.Across_Quantity_Declaration,
- Iir_Kind.Through_Quantity_Declaration,
+ External_Name = [
+ Iir_Kind.External_Constant_Name,
+ Iir_Kind.External_Signal_Name,
+ Iir_Kind.External_Variable_Name,
]
- Type_Attribute = [
+ Expression_Attribute = [
Iir_Kind.Left_Type_Attribute,
Iir_Kind.Right_Type_Attribute,
Iir_Kind.High_Type_Attribute,
Iir_Kind.Low_Type_Attribute,
Iir_Kind.Ascending_Type_Attribute,
- ]
-
- Signal_Value_Attribute = [
+ Iir_Kind.Image_Attribute,
+ Iir_Kind.Value_Attribute,
+ Iir_Kind.Pos_Attribute,
+ Iir_Kind.Val_Attribute,
+ Iir_Kind.Succ_Attribute,
+ Iir_Kind.Pred_Attribute,
+ Iir_Kind.Leftof_Attribute,
+ Iir_Kind.Rightof_Attribute,
+ Iir_Kind.Signal_Slew_Attribute,
+ Iir_Kind.Quantity_Slew_Attribute,
+ Iir_Kind.Ramp_Attribute,
+ Iir_Kind.Zoh_Attribute,
+ Iir_Kind.Ltf_Attribute,
+ Iir_Kind.Ztf_Attribute,
+ Iir_Kind.Dot_Attribute,
+ Iir_Kind.Integ_Attribute,
+ Iir_Kind.Above_Attribute,
+ Iir_Kind.Quantity_Delayed_Attribute,
+ Iir_Kind.Delayed_Attribute,
+ Iir_Kind.Stable_Attribute,
+ Iir_Kind.Quiet_Attribute,
+ Iir_Kind.Transaction_Attribute,
Iir_Kind.Event_Attribute,
Iir_Kind.Active_Attribute,
Iir_Kind.Last_Event_Attribute,
@@ -867,42 +786,17 @@ class Iir_Kinds:
Iir_Kind.Last_Value_Attribute,
Iir_Kind.Driving_Attribute,
Iir_Kind.Driving_Value_Attribute,
- ]
-
- Quantity_Declaration = [
- Iir_Kind.Free_Quantity_Declaration,
- Iir_Kind.Spectrum_Quantity_Declaration,
- Iir_Kind.Noise_Quantity_Declaration,
- Iir_Kind.Across_Quantity_Declaration,
- Iir_Kind.Through_Quantity_Declaration,
- ]
-
- Nonoverloadable_Declaration = [
- Iir_Kind.Type_Declaration,
- Iir_Kind.Anonymous_Type_Declaration,
- Iir_Kind.Subtype_Declaration,
- Iir_Kind.Nature_Declaration,
- Iir_Kind.Subnature_Declaration,
- Iir_Kind.Package_Header,
- Iir_Kind.Unit_Declaration,
- Iir_Kind.Library_Declaration,
- Iir_Kind.Component_Declaration,
- Iir_Kind.Attribute_Declaration,
- Iir_Kind.Group_Template_Declaration,
- Iir_Kind.Group_Declaration,
- Iir_Kind.Element_Declaration,
- Iir_Kind.Nature_Element_Declaration,
- ]
-
- Scalar_Type_And_Subtype_Definition = [
- Iir_Kind.Physical_Subtype_Definition,
- Iir_Kind.Floating_Subtype_Definition,
- Iir_Kind.Integer_Subtype_Definition,
- Iir_Kind.Enumeration_Subtype_Definition,
- Iir_Kind.Enumeration_Type_Definition,
- Iir_Kind.Integer_Type_Definition,
- Iir_Kind.Floating_Type_Definition,
- Iir_Kind.Physical_Type_Definition,
+ Iir_Kind.Behavior_Attribute,
+ Iir_Kind.Structure_Attribute,
+ Iir_Kind.Simple_Name_Attribute,
+ Iir_Kind.Instance_Name_Attribute,
+ Iir_Kind.Path_Name_Attribute,
+ Iir_Kind.Left_Array_Attribute,
+ Iir_Kind.Right_Array_Attribute,
+ Iir_Kind.High_Array_Attribute,
+ Iir_Kind.Low_Array_Attribute,
+ Iir_Kind.Length_Array_Attribute,
+ Iir_Kind.Ascending_Array_Attribute,
]
Attribute = [
@@ -961,23 +855,38 @@ class Iir_Kinds:
Iir_Kind.Reverse_Range_Array_Attribute,
]
- Physical_Literal = [
- Iir_Kind.Physical_Int_Literal,
- Iir_Kind.Physical_Fp_Literal,
+ Type_Attribute = [
+ Iir_Kind.Left_Type_Attribute,
+ Iir_Kind.Right_Type_Attribute,
+ Iir_Kind.High_Type_Attribute,
+ Iir_Kind.Low_Type_Attribute,
+ Iir_Kind.Ascending_Type_Attribute,
]
- Simultaneous_Statement = [
- Iir_Kind.Simple_Simultaneous_Statement,
- Iir_Kind.Simultaneous_Null_Statement,
- Iir_Kind.Simultaneous_Procedural_Statement,
- Iir_Kind.Simultaneous_Case_Statement,
- Iir_Kind.Simultaneous_If_Statement,
+ Subtype_Attribute = [
+ Iir_Kind.Base_Attribute,
+ Iir_Kind.Subtype_Attribute,
+ Iir_Kind.Element_Attribute,
]
- Concurrent_Signal_Assignment = [
- Iir_Kind.Concurrent_Simple_Signal_Assignment,
- Iir_Kind.Concurrent_Conditional_Signal_Assignment,
- Iir_Kind.Concurrent_Selected_Signal_Assignment,
+ Scalar_Type_Attribute = [
+ Iir_Kind.Pos_Attribute,
+ Iir_Kind.Val_Attribute,
+ Iir_Kind.Succ_Attribute,
+ Iir_Kind.Pred_Attribute,
+ Iir_Kind.Leftof_Attribute,
+ Iir_Kind.Rightof_Attribute,
+ ]
+
+ Array_Attribute = [
+ Iir_Kind.Left_Array_Attribute,
+ Iir_Kind.Right_Array_Attribute,
+ Iir_Kind.High_Array_Attribute,
+ Iir_Kind.Low_Array_Attribute,
+ Iir_Kind.Length_Array_Attribute,
+ Iir_Kind.Ascending_Array_Attribute,
+ Iir_Kind.Range_Array_Attribute,
+ Iir_Kind.Reverse_Range_Array_Attribute,
]
Range_Attribute = [
@@ -985,42 +894,121 @@ class Iir_Kinds:
Iir_Kind.Reverse_Range_Array_Attribute,
]
+ Signal_Attribute = [
+ Iir_Kind.Delayed_Attribute,
+ Iir_Kind.Stable_Attribute,
+ Iir_Kind.Quiet_Attribute,
+ Iir_Kind.Transaction_Attribute,
+ ]
+
+ Signal_Value_Attribute = [
+ Iir_Kind.Event_Attribute,
+ Iir_Kind.Active_Attribute,
+ Iir_Kind.Last_Event_Attribute,
+ Iir_Kind.Last_Active_Attribute,
+ Iir_Kind.Last_Value_Attribute,
+ Iir_Kind.Driving_Attribute,
+ Iir_Kind.Driving_Value_Attribute,
+ ]
+
Name_Attribute = [
Iir_Kind.Simple_Name_Attribute,
Iir_Kind.Instance_Name_Attribute,
Iir_Kind.Path_Name_Attribute,
]
- Scalar_Type_Attribute = [
- Iir_Kind.Pos_Attribute,
- Iir_Kind.Val_Attribute,
- Iir_Kind.Succ_Attribute,
- Iir_Kind.Pred_Attribute,
- Iir_Kind.Leftof_Attribute,
- Iir_Kind.Rightof_Attribute,
+ Concurrent_Statement = [
+ Iir_Kind.Sensitized_Process_Statement,
+ Iir_Kind.Process_Statement,
+ Iir_Kind.Concurrent_Simple_Signal_Assignment,
+ Iir_Kind.Concurrent_Conditional_Signal_Assignment,
+ Iir_Kind.Concurrent_Selected_Signal_Assignment,
+ Iir_Kind.Concurrent_Assertion_Statement,
+ Iir_Kind.Concurrent_Procedure_Call_Statement,
+ Iir_Kind.Concurrent_Break_Statement,
+ Iir_Kind.Psl_Assert_Directive,
+ Iir_Kind.Psl_Assume_Directive,
+ Iir_Kind.Psl_Cover_Directive,
+ Iir_Kind.Psl_Restrict_Directive,
+ Iir_Kind.Block_Statement,
+ Iir_Kind.If_Generate_Statement,
+ Iir_Kind.Case_Generate_Statement,
+ Iir_Kind.For_Generate_Statement,
+ Iir_Kind.Component_Instantiation_Statement,
+ Iir_Kind.Psl_Default_Clock,
]
- Name = [
- Iir_Kind.Character_Literal,
- Iir_Kind.Simple_Name,
- Iir_Kind.Selected_Name,
- Iir_Kind.Operator_Symbol,
- Iir_Kind.Reference_Name,
- Iir_Kind.External_Constant_Name,
- Iir_Kind.External_Signal_Name,
- Iir_Kind.External_Variable_Name,
- Iir_Kind.Selected_By_All_Name,
- Iir_Kind.Parenthesis_Name,
+ Simple_Concurrent_Statement = [
+ Iir_Kind.Sensitized_Process_Statement,
+ Iir_Kind.Process_Statement,
+ Iir_Kind.Concurrent_Simple_Signal_Assignment,
+ Iir_Kind.Concurrent_Conditional_Signal_Assignment,
+ Iir_Kind.Concurrent_Selected_Signal_Assignment,
+ Iir_Kind.Concurrent_Assertion_Statement,
+ Iir_Kind.Concurrent_Procedure_Call_Statement,
+ Iir_Kind.Concurrent_Break_Statement,
+ Iir_Kind.Psl_Assert_Directive,
+ Iir_Kind.Psl_Assume_Directive,
+ Iir_Kind.Psl_Cover_Directive,
+ Iir_Kind.Psl_Restrict_Directive,
]
- Subtype_Definition = [
- Iir_Kind.Array_Subtype_Definition,
- Iir_Kind.Record_Subtype_Definition,
- Iir_Kind.Access_Subtype_Definition,
- Iir_Kind.Physical_Subtype_Definition,
- Iir_Kind.Floating_Subtype_Definition,
- Iir_Kind.Integer_Subtype_Definition,
- Iir_Kind.Enumeration_Subtype_Definition,
+ Generate_Statement = [
+ Iir_Kind.If_Generate_Statement,
+ Iir_Kind.Case_Generate_Statement,
+ Iir_Kind.For_Generate_Statement,
+ ]
+
+ Concurrent_Signal_Assignment = [
+ Iir_Kind.Concurrent_Simple_Signal_Assignment,
+ Iir_Kind.Concurrent_Conditional_Signal_Assignment,
+ Iir_Kind.Concurrent_Selected_Signal_Assignment,
+ ]
+
+ If_Case_Generate_Statement = [
+ Iir_Kind.If_Generate_Statement,
+ Iir_Kind.Case_Generate_Statement,
+ ]
+
+ Simultaneous_Statement = [
+ Iir_Kind.Simple_Simultaneous_Statement,
+ Iir_Kind.Simultaneous_Null_Statement,
+ Iir_Kind.Simultaneous_Procedural_Statement,
+ Iir_Kind.Simultaneous_Case_Statement,
+ Iir_Kind.Simultaneous_If_Statement,
+ ]
+
+ Sequential_Statement = [
+ Iir_Kind.Simple_Signal_Assignment_Statement,
+ Iir_Kind.Conditional_Signal_Assignment_Statement,
+ Iir_Kind.Selected_Waveform_Assignment_Statement,
+ Iir_Kind.Signal_Force_Assignment_Statement,
+ Iir_Kind.Signal_Release_Assignment_Statement,
+ Iir_Kind.Null_Statement,
+ Iir_Kind.Assertion_Statement,
+ Iir_Kind.Report_Statement,
+ Iir_Kind.Wait_Statement,
+ Iir_Kind.Variable_Assignment_Statement,
+ Iir_Kind.Conditional_Variable_Assignment_Statement,
+ Iir_Kind.Return_Statement,
+ Iir_Kind.For_Loop_Statement,
+ Iir_Kind.While_Loop_Statement,
+ Iir_Kind.Next_Statement,
+ Iir_Kind.Exit_Statement,
+ Iir_Kind.Case_Statement,
+ Iir_Kind.Procedure_Call_Statement,
+ Iir_Kind.Break_Statement,
+ Iir_Kind.If_Statement,
+ ]
+
+ Next_Exit_Statement = [
+ Iir_Kind.Next_Statement,
+ Iir_Kind.Exit_Statement,
+ ]
+
+ Variable_Assignment_Statement = [
+ Iir_Kind.Variable_Assignment_Statement,
+ Iir_Kind.Conditional_Variable_Assignment_Statement,
]
Allocator = [
@@ -1028,6 +1016,20 @@ class Iir_Kinds:
Iir_Kind.Allocator_By_Subtype,
]
+ Clause = [
+ Iir_Kind.Library_Clause,
+ Iir_Kind.Use_Clause,
+ Iir_Kind.Context_Reference,
+ ]
+
+ Specification = [
+ Iir_Kind.Attribute_Specification,
+ Iir_Kind.Disconnection_Specification,
+ Iir_Kind.Step_Limit_Specification,
+ Iir_Kind.Configuration_Specification,
+ ]
+
+
class Iir_Mode:
Unknown_Mode = 0
@@ -1718,7 +1720,6 @@ class Iir_Predefined:
Ieee_Std_Logic_Misc_Xnor_Reduce_Slv = 651
Ieee_Std_Logic_Misc_Xnor_Reduce_Suv = 652
-
Get_Kind = libghdl.vhdl__nodes__get_kind
Get_Location = libghdl.vhdl__nodes__get_location
@@ -1894,13 +1895,9 @@ Get_Attribute_Designator = libghdl.vhdl__nodes__get_attribute_designator
Set_Attribute_Designator = libghdl.vhdl__nodes__set_attribute_designator
-Get_Attribute_Specification_Chain = (
- libghdl.vhdl__nodes__get_attribute_specification_chain
-)
+Get_Attribute_Specification_Chain = libghdl.vhdl__nodes__get_attribute_specification_chain
-Set_Attribute_Specification_Chain = (
- libghdl.vhdl__nodes__set_attribute_specification_chain
-)
+Set_Attribute_Specification_Chain = libghdl.vhdl__nodes__set_attribute_specification_chain
Get_Attribute_Specification = libghdl.vhdl__nodes__get_attribute_specification
@@ -2074,13 +2071,9 @@ Get_Bound_Vunit_Chain = libghdl.vhdl__nodes__get_bound_vunit_chain
Set_Bound_Vunit_Chain = libghdl.vhdl__nodes__set_bound_vunit_chain
-Get_Verification_Block_Configuration = (
- libghdl.vhdl__nodes__get_verification_block_configuration
-)
+Get_Verification_Block_Configuration = libghdl.vhdl__nodes__get_verification_block_configuration
-Set_Verification_Block_Configuration = (
- libghdl.vhdl__nodes__set_verification_block_configuration
-)
+Set_Verification_Block_Configuration = libghdl.vhdl__nodes__set_verification_block_configuration
Get_Block_Configuration = libghdl.vhdl__nodes__get_block_configuration
@@ -2202,13 +2195,9 @@ Get_Implicit_Definition = libghdl.vhdl__nodes__get_implicit_definition
Set_Implicit_Definition = libghdl.vhdl__nodes__set_implicit_definition
-Get_Uninstantiated_Subprogram_Name = (
- libghdl.vhdl__nodes__get_uninstantiated_subprogram_name
-)
+Get_Uninstantiated_Subprogram_Name = libghdl.vhdl__nodes__get_uninstantiated_subprogram_name
-Set_Uninstantiated_Subprogram_Name = (
- libghdl.vhdl__nodes__set_uninstantiated_subprogram_name
-)
+Set_Uninstantiated_Subprogram_Name = libghdl.vhdl__nodes__set_uninstantiated_subprogram_name
Get_Default_Value = libghdl.vhdl__nodes__get_default_value
@@ -2354,13 +2343,9 @@ Get_Resolution_Indication = libghdl.vhdl__nodes__get_resolution_indication
Set_Resolution_Indication = libghdl.vhdl__nodes__set_resolution_indication
-Get_Record_Element_Resolution_Chain = (
- libghdl.vhdl__nodes__get_record_element_resolution_chain
-)
+Get_Record_Element_Resolution_Chain = libghdl.vhdl__nodes__get_record_element_resolution_chain
-Set_Record_Element_Resolution_Chain = (
- libghdl.vhdl__nodes__set_record_element_resolution_chain
-)
+Set_Record_Element_Resolution_Chain = libghdl.vhdl__nodes__set_record_element_resolution_chain
Get_Tolerance = libghdl.vhdl__nodes__get_tolerance
@@ -2430,13 +2415,9 @@ Get_Index_Subtype_List = libghdl.vhdl__nodes__get_index_subtype_list
Set_Index_Subtype_List = libghdl.vhdl__nodes__set_index_subtype_list
-Get_Index_Subtype_Definition_List = (
- libghdl.vhdl__nodes__get_index_subtype_definition_list
-)
+Get_Index_Subtype_Definition_List = libghdl.vhdl__nodes__get_index_subtype_definition_list
-Set_Index_Subtype_Definition_List = (
- libghdl.vhdl__nodes__set_index_subtype_definition_list
-)
+Set_Index_Subtype_Definition_List = libghdl.vhdl__nodes__set_index_subtype_definition_list
Get_Element_Subtype_Indication = libghdl.vhdl__nodes__get_element_subtype_indication
@@ -2474,13 +2455,9 @@ Get_Designated_Type = libghdl.vhdl__nodes__get_designated_type
Set_Designated_Type = libghdl.vhdl__nodes__set_designated_type
-Get_Designated_Subtype_Indication = (
- libghdl.vhdl__nodes__get_designated_subtype_indication
-)
+Get_Designated_Subtype_Indication = libghdl.vhdl__nodes__get_designated_subtype_indication
-Set_Designated_Subtype_Indication = (
- libghdl.vhdl__nodes__set_designated_subtype_indication
-)
+Set_Designated_Subtype_Indication = libghdl.vhdl__nodes__set_designated_subtype_indication
Get_Index_List = libghdl.vhdl__nodes__get_index_list
@@ -2694,13 +2671,9 @@ Get_Default_Binding_Indication = libghdl.vhdl__nodes__get_default_binding_indica
Set_Default_Binding_Indication = libghdl.vhdl__nodes__set_default_binding_indication
-Get_Default_Configuration_Declaration = (
- libghdl.vhdl__nodes__get_default_configuration_declaration
-)
+Get_Default_Configuration_Declaration = libghdl.vhdl__nodes__get_default_configuration_declaration
-Set_Default_Configuration_Declaration = (
- libghdl.vhdl__nodes__set_default_configuration_declaration
-)
+Set_Default_Configuration_Declaration = libghdl.vhdl__nodes__set_default_configuration_declaration
Get_Expression = libghdl.vhdl__nodes__get_expression
@@ -2998,13 +2971,9 @@ Get_Association_Choices_Chain = libghdl.vhdl__nodes__get_association_choices_cha
Set_Association_Choices_Chain = libghdl.vhdl__nodes__set_association_choices_chain
-Get_Case_Statement_Alternative_Chain = (
- libghdl.vhdl__nodes__get_case_statement_alternative_chain
-)
+Get_Case_Statement_Alternative_Chain = libghdl.vhdl__nodes__get_case_statement_alternative_chain
-Set_Case_Statement_Alternative_Chain = (
- libghdl.vhdl__nodes__set_case_statement_alternative_chain
-)
+Set_Case_Statement_Alternative_Chain = libghdl.vhdl__nodes__set_case_statement_alternative_chain
Get_Choice_Staticness = libghdl.vhdl__nodes__get_choice_staticness
diff --git a/pyGHDL/libghdl/vhdl/nodes_meta.py b/pyGHDL/libghdl/vhdl/nodes_meta.py
new file mode 100644
index 000000000..20cb50e4e
--- /dev/null
+++ b/pyGHDL/libghdl/vhdl/nodes_meta.py
@@ -0,0 +1,1604 @@
+from pyGHDL.libghdl import libghdl
+
+
+# From nodes_meta
+get_fields_first = libghdl.vhdl__nodes_meta__get_fields_first
+
+get_fields_last = libghdl.vhdl__nodes_meta__get_fields_last
+
+get_field_by_index = libghdl.vhdl__nodes_meta__get_field_by_index
+
+get_field_type = libghdl.vhdl__nodes_meta__get_field_type
+
+get_field_attribute = libghdl.vhdl__nodes_meta__get_field_attribute
+
+
+class types:
+ Boolean = 0
+ Date_State_Type = 1
+ Date_Type = 2
+ Direction_Type = 3
+ File_Checksum_Id = 4
+ Fp64 = 5
+ Iir = 6
+ Iir_All_Sensitized = 7
+ Iir_Constraint = 8
+ Iir_Delay_Mechanism = 9
+ Iir_Flist = 10
+ Iir_Force_Mode = 11
+ Iir_Index32 = 12
+ Iir_Int32 = 13
+ Iir_List = 14
+ Iir_Mode = 15
+ Iir_Predefined_Functions = 16
+ Iir_Pure_State = 17
+ Iir_Signal_Kind = 18
+ Iir_Staticness = 19
+ Int32 = 20
+ Int64 = 21
+ Name_Id = 22
+ Number_Base_Type = 23
+ PSL_NFA = 24
+ PSL_Node = 25
+ Scalar_Size = 26
+ Source_File_Entry = 27
+ Source_Ptr = 28
+ String8_Id = 29
+ Time_Stamp_Id = 30
+ Token_Type = 31
+ Tri_State_Type = 32
+
+
+class Attr:
+ ANone = 0
+ Chain = 1
+ Chain_Next = 2
+ Forward_Ref = 3
+ Maybe_Forward_Ref = 4
+ Maybe_Ref = 5
+ Of_Maybe_Ref = 6
+ Of_Ref = 7
+ Ref = 8
+
+
+class fields:
+ First_Design_Unit = 0
+ Last_Design_Unit = 1
+ Library_Declaration = 2
+ File_Checksum = 3
+ Analysis_Time_Stamp = 4
+ Design_File_Source = 5
+ Library = 6
+ File_Dependence_List = 7
+ Design_File_Filename = 8
+ Design_File_Directory = 9
+ Design_File = 10
+ Design_File_Chain = 11
+ Library_Directory = 12
+ Date = 13
+ Context_Items = 14
+ Dependence_List = 15
+ Analysis_Checks_List = 16
+ Date_State = 17
+ Guarded_Target_State = 18
+ Library_Unit = 19
+ Hash_Chain = 20
+ Design_Unit_Source_Pos = 21
+ Design_Unit_Source_Line = 22
+ Design_Unit_Source_Col = 23
+ Value = 24
+ Enum_Pos = 25
+ Physical_Literal = 26
+ Fp_Value = 27
+ Simple_Aggregate_List = 28
+ String8_Id = 29
+ String_Length = 30
+ Bit_String_Base = 31
+ Has_Signed = 32
+ Has_Sign = 33
+ Has_Length = 34
+ Literal_Length = 35
+ Literal_Origin = 36
+ Range_Origin = 37
+ Literal_Subtype = 38
+ Allocator_Subtype = 39
+ Entity_Class = 40
+ Entity_Name_List = 41
+ Attribute_Designator = 42
+ Attribute_Specification_Chain = 43
+ Attribute_Specification = 44
+ Static_Attribute_Flag = 45
+ Signal_List = 46
+ Quantity_List = 47
+ Designated_Entity = 48
+ Formal = 49
+ Actual = 50
+ Actual_Conversion = 51
+ Formal_Conversion = 52
+ Whole_Association_Flag = 53
+ Collapse_Signal_Flag = 54
+ Artificial_Flag = 55
+ Open_Flag = 56
+ After_Drivers_Flag = 57
+ We_Value = 58
+ Time = 59
+ Associated_Expr = 60
+ Associated_Block = 61
+ Associated_Chain = 62
+ Choice_Name = 63
+ Choice_Expression = 64
+ Choice_Range = 65
+ Same_Alternative_Flag = 66
+ Element_Type_Flag = 67
+ Architecture = 68
+ Block_Specification = 69
+ Prev_Block_Configuration = 70
+ Configuration_Item_Chain = 71
+ Attribute_Value_Chain = 72
+ Spec_Chain = 73
+ Value_Chain = 74
+ Attribute_Value_Spec_Chain = 75
+ Entity_Name = 76
+ Package = 77
+ Package_Body = 78
+ Instance_Package_Body = 79
+ Need_Body = 80
+ Macro_Expanded_Flag = 81
+ Need_Instance_Bodies = 82
+ Hierarchical_Name = 83
+ Inherit_Spec_Chain = 84
+ Vunit_Item_Chain = 85
+ Bound_Vunit_Chain = 86
+ Verification_Block_Configuration = 87
+ Block_Configuration = 88
+ Concurrent_Statement_Chain = 89
+ Chain = 90
+ Port_Chain = 91
+ Generic_Chain = 92
+ Type = 93
+ Subtype_Indication = 94
+ Discrete_Range = 95
+ Type_Definition = 96
+ Subtype_Definition = 97
+ Incomplete_Type_Declaration = 98
+ Interface_Type_Subprograms = 99
+ Nature_Definition = 100
+ Nature = 101
+ Subnature_Indication = 102
+ Mode = 103
+ Guarded_Signal_Flag = 104
+ Signal_Kind = 105
+ Base_Name = 106
+ Interface_Declaration_Chain = 107
+ Subprogram_Specification = 108
+ Sequential_Statement_Chain = 109
+ Simultaneous_Statement_Chain = 110
+ Subprogram_Body = 111
+ Overload_Number = 112
+ Subprogram_Depth = 113
+ Subprogram_Hash = 114
+ Impure_Depth = 115
+ Return_Type = 116
+ Implicit_Definition = 117
+ Uninstantiated_Subprogram_Name = 118
+ Default_Value = 119
+ Deferred_Declaration = 120
+ Deferred_Declaration_Flag = 121
+ Shared_Flag = 122
+ Design_Unit = 123
+ Block_Statement = 124
+ Signal_Driver = 125
+ Declaration_Chain = 126
+ File_Logical_Name = 127
+ File_Open_Kind = 128
+ Element_Position = 129
+ Use_Clause_Chain = 130
+ Context_Reference_Chain = 131
+ Selected_Name = 132
+ Type_Declarator = 133
+ Complete_Type_Definition = 134
+ Incomplete_Type_Ref_Chain = 135
+ Associated_Type = 136
+ Enumeration_Literal_List = 137
+ Entity_Class_Entry_Chain = 138
+ Group_Constituent_List = 139
+ Unit_Chain = 140
+ Primary_Unit = 141
+ Identifier = 142
+ Label = 143
+ Visible_Flag = 144
+ Range_Constraint = 145
+ Direction = 146
+ Left_Limit = 147
+ Right_Limit = 148
+ Left_Limit_Expr = 149
+ Right_Limit_Expr = 150
+ Parent_Type = 151
+ Simple_Nature = 152
+ Base_Nature = 153
+ Resolution_Indication = 154
+ Record_Element_Resolution_Chain = 155
+ Tolerance = 156
+ Plus_Terminal_Name = 157
+ Minus_Terminal_Name = 158
+ Plus_Terminal = 159
+ Minus_Terminal = 160
+ Magnitude_Expression = 161
+ Phase_Expression = 162
+ Power_Expression = 163
+ Simultaneous_Left = 164
+ Simultaneous_Right = 165
+ Text_File_Flag = 166
+ Only_Characters_Flag = 167
+ Is_Character_Type = 168
+ Nature_Staticness = 169
+ Type_Staticness = 170
+ Constraint_State = 171
+ Index_Subtype_List = 172
+ Index_Subtype_Definition_List = 173
+ Element_Subtype_Indication = 174
+ Element_Subtype = 175
+ Element_Subnature_Indication = 176
+ Element_Subnature = 177
+ Index_Constraint_List = 178
+ Array_Element_Constraint = 179
+ Elements_Declaration_List = 180
+ Owned_Elements_Chain = 181
+ Designated_Type = 182
+ Designated_Subtype_Indication = 183
+ Index_List = 184
+ Reference = 185
+ Nature_Declarator = 186
+ Across_Type_Mark = 187
+ Through_Type_Mark = 188
+ Across_Type_Definition = 189
+ Through_Type_Definition = 190
+ Across_Type = 191
+ Through_Type = 192
+ Target = 193
+ Waveform_Chain = 194
+ Guard = 195
+ Delay_Mechanism = 196
+ Reject_Time_Expression = 197
+ Force_Mode = 198
+ Has_Force_Mode = 199
+ Sensitivity_List = 200
+ Process_Origin = 201
+ Package_Origin = 202
+ Condition_Clause = 203
+ Break_Element = 204
+ Selector_Quantity = 205
+ Break_Quantity = 206
+ Timeout_Clause = 207
+ Postponed_Flag = 208
+ Callees_List = 209
+ Passive_Flag = 210
+ Resolution_Function_Flag = 211
+ Wait_State = 212
+ All_Sensitized_State = 213
+ Seen_Flag = 214
+ Pure_Flag = 215
+ Foreign_Flag = 216
+ Resolved_Flag = 217
+ Signal_Type_Flag = 218
+ Has_Signal_Flag = 219
+ Purity_State = 220
+ Elab_Flag = 221
+ Vendor_Library_Flag = 222
+ Configuration_Mark_Flag = 223
+ Configuration_Done_Flag = 224
+ Index_Constraint_Flag = 225
+ Hide_Implicit_Flag = 226
+ Assertion_Condition = 227
+ Report_Expression = 228
+ Severity_Expression = 229
+ Instantiated_Unit = 230
+ Generic_Map_Aspect_Chain = 231
+ Port_Map_Aspect_Chain = 232
+ Configuration_Name = 233
+ Component_Configuration = 234
+ Configuration_Specification = 235
+ Default_Binding_Indication = 236
+ Default_Configuration_Declaration = 237
+ Expression = 238
+ Conditional_Expression_Chain = 239
+ Allocator_Designated_Type = 240
+ Selected_Waveform_Chain = 241
+ Conditional_Waveform_Chain = 242
+ Guard_Expression = 243
+ Guard_Decl = 244
+ Guard_Sensitivity_List = 245
+ Signal_Attribute_Chain = 246
+ Block_Block_Configuration = 247
+ Package_Header = 248
+ Block_Header = 249
+ Uninstantiated_Package_Name = 250
+ Uninstantiated_Package_Decl = 251
+ Instance_Source_File = 252
+ Generate_Block_Configuration = 253
+ Generate_Statement_Body = 254
+ Alternative_Label = 255
+ Generate_Else_Clause = 256
+ Condition = 257
+ Else_Clause = 258
+ Parameter_Specification = 259
+ Parent = 260
+ Loop_Label = 261
+ Exit_Flag = 262
+ Next_Flag = 263
+ Component_Name = 264
+ Instantiation_List = 265
+ Entity_Aspect = 266
+ Default_Entity_Aspect = 267
+ Binding_Indication = 268
+ Named_Entity = 269
+ Alias_Declaration = 270
+ Referenced_Name = 271
+ Expr_Staticness = 272
+ Scalar_Size = 273
+ Error_Origin = 274
+ Operand = 275
+ Left = 276
+ Right = 277
+ Unit_Name = 278
+ Name = 279
+ Group_Template_Name = 280
+ Name_Staticness = 281
+ Prefix = 282
+ Signature_Prefix = 283
+ External_Pathname = 284
+ Pathname_Suffix = 285
+ Pathname_Expression = 286
+ In_Formal_Flag = 287
+ Slice_Subtype = 288
+ Suffix = 289
+ Index_Subtype = 290
+ Parameter = 291
+ Parameter_2 = 292
+ Parameter_3 = 293
+ Parameter_4 = 294
+ Attr_Chain = 295
+ Signal_Attribute_Declaration = 296
+ Actual_Type = 297
+ Actual_Type_Definition = 298
+ Association_Chain = 299
+ Individual_Association_Chain = 300
+ Subprogram_Association_Chain = 301
+ Aggregate_Info = 302
+ Sub_Aggregate_Info = 303
+ Aggr_Dynamic_Flag = 304
+ Aggr_Min_Length = 305
+ Aggr_Low_Limit = 306
+ Aggr_High_Limit = 307
+ Aggr_Others_Flag = 308
+ Aggr_Named_Flag = 309
+ Aggregate_Expand_Flag = 310
+ Association_Choices_Chain = 311
+ Case_Statement_Alternative_Chain = 312
+ Choice_Staticness = 313
+ Procedure_Call = 314
+ Implementation = 315
+ Parameter_Association_Chain = 316
+ Method_Object = 317
+ Subtype_Type_Mark = 318
+ Subnature_Nature_Mark = 319
+ Type_Conversion_Subtype = 320
+ Type_Mark = 321
+ File_Type_Mark = 322
+ Return_Type_Mark = 323
+ Has_Disconnect_Flag = 324
+ Has_Active_Flag = 325
+ Is_Within_Flag = 326
+ Type_Marks_List = 327
+ Implicit_Alias_Flag = 328
+ Alias_Signature = 329
+ Attribute_Signature = 330
+ Overload_List = 331
+ Simple_Name_Identifier = 332
+ Simple_Name_Subtype = 333
+ Protected_Type_Body = 334
+ Protected_Type_Declaration = 335
+ Use_Flag = 336
+ End_Has_Reserved_Id = 337
+ End_Has_Identifier = 338
+ End_Has_Postponed = 339
+ Has_Label = 340
+ Has_Begin = 341
+ Has_End = 342
+ Has_Is = 343
+ Has_Pure = 344
+ Has_Body = 345
+ Has_Parameter = 346
+ Has_Component = 347
+ Has_Identifier_List = 348
+ Has_Mode = 349
+ Has_Class = 350
+ Has_Delay_Mechanism = 351
+ Suspend_Flag = 352
+ Is_Ref = 353
+ Is_Forward_Ref = 354
+ Psl_Property = 355
+ Psl_Sequence = 356
+ Psl_Declaration = 357
+ Psl_Expression = 358
+ Psl_Boolean = 359
+ PSL_Clock = 360
+ PSL_NFA = 361
+ PSL_Nbr_States = 362
+ PSL_Clock_Sensitivity = 363
+ PSL_EOS_Flag = 364
+ Count_Expression = 365
+ Clock_Expression = 366
+ Default_Clock = 367
+
+
+Get_Boolean = libghdl.vhdl__nodes_meta__get_boolean
+
+Get_Date_State_Type = libghdl.vhdl__nodes_meta__get_date_state_type
+
+Get_Date_Type = libghdl.vhdl__nodes_meta__get_date_type
+
+Get_Direction_Type = libghdl.vhdl__nodes_meta__get_direction_type
+
+Get_File_Checksum_Id = libghdl.vhdl__nodes_meta__get_file_checksum_id
+
+Get_Fp64 = libghdl.vhdl__nodes_meta__get_fp64
+
+Get_Iir = libghdl.vhdl__nodes_meta__get_iir
+
+Get_Iir_All_Sensitized = libghdl.vhdl__nodes_meta__get_iir_all_sensitized
+
+Get_Iir_Constraint = libghdl.vhdl__nodes_meta__get_iir_constraint
+
+Get_Iir_Delay_Mechanism = libghdl.vhdl__nodes_meta__get_iir_delay_mechanism
+
+Get_Iir_Flist = libghdl.vhdl__nodes_meta__get_iir_flist
+
+Get_Iir_Force_Mode = libghdl.vhdl__nodes_meta__get_iir_force_mode
+
+Get_Iir_Index32 = libghdl.vhdl__nodes_meta__get_iir_index32
+
+Get_Iir_Int32 = libghdl.vhdl__nodes_meta__get_iir_int32
+
+Get_Iir_List = libghdl.vhdl__nodes_meta__get_iir_list
+
+Get_Iir_Mode = libghdl.vhdl__nodes_meta__get_iir_mode
+
+Get_Iir_Predefined_Functions = libghdl.vhdl__nodes_meta__get_iir_predefined_functions
+
+Get_Iir_Pure_State = libghdl.vhdl__nodes_meta__get_iir_pure_state
+
+Get_Iir_Signal_Kind = libghdl.vhdl__nodes_meta__get_iir_signal_kind
+
+Get_Iir_Staticness = libghdl.vhdl__nodes_meta__get_iir_staticness
+
+Get_Int32 = libghdl.vhdl__nodes_meta__get_int32
+
+Get_Int64 = libghdl.vhdl__nodes_meta__get_int64
+
+Get_Name_Id = libghdl.vhdl__nodes_meta__get_name_id
+
+Get_Number_Base_Type = libghdl.vhdl__nodes_meta__get_number_base_type
+
+Get_PSL_NFA = libghdl.vhdl__nodes_meta__get_psl_nfa
+
+Get_PSL_Node = libghdl.vhdl__nodes_meta__get_psl_node
+
+Get_Scalar_Size = libghdl.vhdl__nodes_meta__get_scalar_size
+
+Get_Source_File_Entry = libghdl.vhdl__nodes_meta__get_source_file_entry
+
+Get_Source_Ptr = libghdl.vhdl__nodes_meta__get_source_ptr
+
+Get_String8_Id = libghdl.vhdl__nodes_meta__get_string8_id
+
+Get_Time_Stamp_Id = libghdl.vhdl__nodes_meta__get_time_stamp_id
+
+Get_Token_Type = libghdl.vhdl__nodes_meta__get_token_type
+
+Get_Tri_State_Type = libghdl.vhdl__nodes_meta__get_tri_state_type
+
+
+Has_First_Design_Unit =\
+ libghdl.vhdl__nodes_meta__has_first_design_unit
+
+Has_Last_Design_Unit =\
+ libghdl.vhdl__nodes_meta__has_last_design_unit
+
+Has_Library_Declaration =\
+ libghdl.vhdl__nodes_meta__has_library_declaration
+
+Has_File_Checksum =\
+ libghdl.vhdl__nodes_meta__has_file_checksum
+
+Has_Analysis_Time_Stamp =\
+ libghdl.vhdl__nodes_meta__has_analysis_time_stamp
+
+Has_Design_File_Source =\
+ libghdl.vhdl__nodes_meta__has_design_file_source
+
+Has_Library =\
+ libghdl.vhdl__nodes_meta__has_library
+
+Has_File_Dependence_List =\
+ libghdl.vhdl__nodes_meta__has_file_dependence_list
+
+Has_Design_File_Filename =\
+ libghdl.vhdl__nodes_meta__has_design_file_filename
+
+Has_Design_File_Directory =\
+ libghdl.vhdl__nodes_meta__has_design_file_directory
+
+Has_Design_File =\
+ libghdl.vhdl__nodes_meta__has_design_file
+
+Has_Design_File_Chain =\
+ libghdl.vhdl__nodes_meta__has_design_file_chain
+
+Has_Library_Directory =\
+ libghdl.vhdl__nodes_meta__has_library_directory
+
+Has_Date =\
+ libghdl.vhdl__nodes_meta__has_date
+
+Has_Context_Items =\
+ libghdl.vhdl__nodes_meta__has_context_items
+
+Has_Dependence_List =\
+ libghdl.vhdl__nodes_meta__has_dependence_list
+
+Has_Analysis_Checks_List =\
+ libghdl.vhdl__nodes_meta__has_analysis_checks_list
+
+Has_Date_State =\
+ libghdl.vhdl__nodes_meta__has_date_state
+
+Has_Guarded_Target_State =\
+ libghdl.vhdl__nodes_meta__has_guarded_target_state
+
+Has_Library_Unit =\
+ libghdl.vhdl__nodes_meta__has_library_unit
+
+Has_Hash_Chain =\
+ libghdl.vhdl__nodes_meta__has_hash_chain
+
+Has_Design_Unit_Source_Pos =\
+ libghdl.vhdl__nodes_meta__has_design_unit_source_pos
+
+Has_Design_Unit_Source_Line =\
+ libghdl.vhdl__nodes_meta__has_design_unit_source_line
+
+Has_Design_Unit_Source_Col =\
+ libghdl.vhdl__nodes_meta__has_design_unit_source_col
+
+Has_Value =\
+ libghdl.vhdl__nodes_meta__has_value
+
+Has_Enum_Pos =\
+ libghdl.vhdl__nodes_meta__has_enum_pos
+
+Has_Physical_Literal =\
+ libghdl.vhdl__nodes_meta__has_physical_literal
+
+Has_Fp_Value =\
+ libghdl.vhdl__nodes_meta__has_fp_value
+
+Has_Simple_Aggregate_List =\
+ libghdl.vhdl__nodes_meta__has_simple_aggregate_list
+
+Has_String8_Id =\
+ libghdl.vhdl__nodes_meta__has_string8_id
+
+Has_String_Length =\
+ libghdl.vhdl__nodes_meta__has_string_length
+
+Has_Bit_String_Base =\
+ libghdl.vhdl__nodes_meta__has_bit_string_base
+
+Has_Has_Signed =\
+ libghdl.vhdl__nodes_meta__has_has_signed
+
+Has_Has_Sign =\
+ libghdl.vhdl__nodes_meta__has_has_sign
+
+Has_Has_Length =\
+ libghdl.vhdl__nodes_meta__has_has_length
+
+Has_Literal_Length =\
+ libghdl.vhdl__nodes_meta__has_literal_length
+
+Has_Literal_Origin =\
+ libghdl.vhdl__nodes_meta__has_literal_origin
+
+Has_Range_Origin =\
+ libghdl.vhdl__nodes_meta__has_range_origin
+
+Has_Literal_Subtype =\
+ libghdl.vhdl__nodes_meta__has_literal_subtype
+
+Has_Allocator_Subtype =\
+ libghdl.vhdl__nodes_meta__has_allocator_subtype
+
+Has_Entity_Class =\
+ libghdl.vhdl__nodes_meta__has_entity_class
+
+Has_Entity_Name_List =\
+ libghdl.vhdl__nodes_meta__has_entity_name_list
+
+Has_Attribute_Designator =\
+ libghdl.vhdl__nodes_meta__has_attribute_designator
+
+Has_Attribute_Specification_Chain =\
+ libghdl.vhdl__nodes_meta__has_attribute_specification_chain
+
+Has_Attribute_Specification =\
+ libghdl.vhdl__nodes_meta__has_attribute_specification
+
+Has_Static_Attribute_Flag =\
+ libghdl.vhdl__nodes_meta__has_static_attribute_flag
+
+Has_Signal_List =\
+ libghdl.vhdl__nodes_meta__has_signal_list
+
+Has_Quantity_List =\
+ libghdl.vhdl__nodes_meta__has_quantity_list
+
+Has_Designated_Entity =\
+ libghdl.vhdl__nodes_meta__has_designated_entity
+
+Has_Formal =\
+ libghdl.vhdl__nodes_meta__has_formal
+
+Has_Actual =\
+ libghdl.vhdl__nodes_meta__has_actual
+
+Has_Actual_Conversion =\
+ libghdl.vhdl__nodes_meta__has_actual_conversion
+
+Has_Formal_Conversion =\
+ libghdl.vhdl__nodes_meta__has_formal_conversion
+
+Has_Whole_Association_Flag =\
+ libghdl.vhdl__nodes_meta__has_whole_association_flag
+
+Has_Collapse_Signal_Flag =\
+ libghdl.vhdl__nodes_meta__has_collapse_signal_flag
+
+Has_Artificial_Flag =\
+ libghdl.vhdl__nodes_meta__has_artificial_flag
+
+Has_Open_Flag =\
+ libghdl.vhdl__nodes_meta__has_open_flag
+
+Has_After_Drivers_Flag =\
+ libghdl.vhdl__nodes_meta__has_after_drivers_flag
+
+Has_We_Value =\
+ libghdl.vhdl__nodes_meta__has_we_value
+
+Has_Time =\
+ libghdl.vhdl__nodes_meta__has_time
+
+Has_Associated_Expr =\
+ libghdl.vhdl__nodes_meta__has_associated_expr
+
+Has_Associated_Block =\
+ libghdl.vhdl__nodes_meta__has_associated_block
+
+Has_Associated_Chain =\
+ libghdl.vhdl__nodes_meta__has_associated_chain
+
+Has_Choice_Name =\
+ libghdl.vhdl__nodes_meta__has_choice_name
+
+Has_Choice_Expression =\
+ libghdl.vhdl__nodes_meta__has_choice_expression
+
+Has_Choice_Range =\
+ libghdl.vhdl__nodes_meta__has_choice_range
+
+Has_Same_Alternative_Flag =\
+ libghdl.vhdl__nodes_meta__has_same_alternative_flag
+
+Has_Element_Type_Flag =\
+ libghdl.vhdl__nodes_meta__has_element_type_flag
+
+Has_Architecture =\
+ libghdl.vhdl__nodes_meta__has_architecture
+
+Has_Block_Specification =\
+ libghdl.vhdl__nodes_meta__has_block_specification
+
+Has_Prev_Block_Configuration =\
+ libghdl.vhdl__nodes_meta__has_prev_block_configuration
+
+Has_Configuration_Item_Chain =\
+ libghdl.vhdl__nodes_meta__has_configuration_item_chain
+
+Has_Attribute_Value_Chain =\
+ libghdl.vhdl__nodes_meta__has_attribute_value_chain
+
+Has_Spec_Chain =\
+ libghdl.vhdl__nodes_meta__has_spec_chain
+
+Has_Value_Chain =\
+ libghdl.vhdl__nodes_meta__has_value_chain
+
+Has_Attribute_Value_Spec_Chain =\
+ libghdl.vhdl__nodes_meta__has_attribute_value_spec_chain
+
+Has_Entity_Name =\
+ libghdl.vhdl__nodes_meta__has_entity_name
+
+Has_Package =\
+ libghdl.vhdl__nodes_meta__has_package
+
+Has_Package_Body =\
+ libghdl.vhdl__nodes_meta__has_package_body
+
+Has_Instance_Package_Body =\
+ libghdl.vhdl__nodes_meta__has_instance_package_body
+
+Has_Need_Body =\
+ libghdl.vhdl__nodes_meta__has_need_body
+
+Has_Macro_Expanded_Flag =\
+ libghdl.vhdl__nodes_meta__has_macro_expanded_flag
+
+Has_Need_Instance_Bodies =\
+ libghdl.vhdl__nodes_meta__has_need_instance_bodies
+
+Has_Hierarchical_Name =\
+ libghdl.vhdl__nodes_meta__has_hierarchical_name
+
+Has_Inherit_Spec_Chain =\
+ libghdl.vhdl__nodes_meta__has_inherit_spec_chain
+
+Has_Vunit_Item_Chain =\
+ libghdl.vhdl__nodes_meta__has_vunit_item_chain
+
+Has_Bound_Vunit_Chain =\
+ libghdl.vhdl__nodes_meta__has_bound_vunit_chain
+
+Has_Verification_Block_Configuration =\
+ libghdl.vhdl__nodes_meta__has_verification_block_configuration
+
+Has_Block_Configuration =\
+ libghdl.vhdl__nodes_meta__has_block_configuration
+
+Has_Concurrent_Statement_Chain =\
+ libghdl.vhdl__nodes_meta__has_concurrent_statement_chain
+
+Has_Chain =\
+ libghdl.vhdl__nodes_meta__has_chain
+
+Has_Port_Chain =\
+ libghdl.vhdl__nodes_meta__has_port_chain
+
+Has_Generic_Chain =\
+ libghdl.vhdl__nodes_meta__has_generic_chain
+
+Has_Type =\
+ libghdl.vhdl__nodes_meta__has_type
+
+Has_Subtype_Indication =\
+ libghdl.vhdl__nodes_meta__has_subtype_indication
+
+Has_Discrete_Range =\
+ libghdl.vhdl__nodes_meta__has_discrete_range
+
+Has_Type_Definition =\
+ libghdl.vhdl__nodes_meta__has_type_definition
+
+Has_Subtype_Definition =\
+ libghdl.vhdl__nodes_meta__has_subtype_definition
+
+Has_Incomplete_Type_Declaration =\
+ libghdl.vhdl__nodes_meta__has_incomplete_type_declaration
+
+Has_Interface_Type_Subprograms =\
+ libghdl.vhdl__nodes_meta__has_interface_type_subprograms
+
+Has_Nature_Definition =\
+ libghdl.vhdl__nodes_meta__has_nature_definition
+
+Has_Nature =\
+ libghdl.vhdl__nodes_meta__has_nature
+
+Has_Subnature_Indication =\
+ libghdl.vhdl__nodes_meta__has_subnature_indication
+
+Has_Mode =\
+ libghdl.vhdl__nodes_meta__has_mode
+
+Has_Guarded_Signal_Flag =\
+ libghdl.vhdl__nodes_meta__has_guarded_signal_flag
+
+Has_Signal_Kind =\
+ libghdl.vhdl__nodes_meta__has_signal_kind
+
+Has_Base_Name =\
+ libghdl.vhdl__nodes_meta__has_base_name
+
+Has_Interface_Declaration_Chain =\
+ libghdl.vhdl__nodes_meta__has_interface_declaration_chain
+
+Has_Subprogram_Specification =\
+ libghdl.vhdl__nodes_meta__has_subprogram_specification
+
+Has_Sequential_Statement_Chain =\
+ libghdl.vhdl__nodes_meta__has_sequential_statement_chain
+
+Has_Simultaneous_Statement_Chain =\
+ libghdl.vhdl__nodes_meta__has_simultaneous_statement_chain
+
+Has_Subprogram_Body =\
+ libghdl.vhdl__nodes_meta__has_subprogram_body
+
+Has_Overload_Number =\
+ libghdl.vhdl__nodes_meta__has_overload_number
+
+Has_Subprogram_Depth =\
+ libghdl.vhdl__nodes_meta__has_subprogram_depth
+
+Has_Subprogram_Hash =\
+ libghdl.vhdl__nodes_meta__has_subprogram_hash
+
+Has_Impure_Depth =\
+ libghdl.vhdl__nodes_meta__has_impure_depth
+
+Has_Return_Type =\
+ libghdl.vhdl__nodes_meta__has_return_type
+
+Has_Implicit_Definition =\
+ libghdl.vhdl__nodes_meta__has_implicit_definition
+
+Has_Uninstantiated_Subprogram_Name =\
+ libghdl.vhdl__nodes_meta__has_uninstantiated_subprogram_name
+
+Has_Default_Value =\
+ libghdl.vhdl__nodes_meta__has_default_value
+
+Has_Deferred_Declaration =\
+ libghdl.vhdl__nodes_meta__has_deferred_declaration
+
+Has_Deferred_Declaration_Flag =\
+ libghdl.vhdl__nodes_meta__has_deferred_declaration_flag
+
+Has_Shared_Flag =\
+ libghdl.vhdl__nodes_meta__has_shared_flag
+
+Has_Design_Unit =\
+ libghdl.vhdl__nodes_meta__has_design_unit
+
+Has_Block_Statement =\
+ libghdl.vhdl__nodes_meta__has_block_statement
+
+Has_Signal_Driver =\
+ libghdl.vhdl__nodes_meta__has_signal_driver
+
+Has_Declaration_Chain =\
+ libghdl.vhdl__nodes_meta__has_declaration_chain
+
+Has_File_Logical_Name =\
+ libghdl.vhdl__nodes_meta__has_file_logical_name
+
+Has_File_Open_Kind =\
+ libghdl.vhdl__nodes_meta__has_file_open_kind
+
+Has_Element_Position =\
+ libghdl.vhdl__nodes_meta__has_element_position
+
+Has_Use_Clause_Chain =\
+ libghdl.vhdl__nodes_meta__has_use_clause_chain
+
+Has_Context_Reference_Chain =\
+ libghdl.vhdl__nodes_meta__has_context_reference_chain
+
+Has_Selected_Name =\
+ libghdl.vhdl__nodes_meta__has_selected_name
+
+Has_Type_Declarator =\
+ libghdl.vhdl__nodes_meta__has_type_declarator
+
+Has_Complete_Type_Definition =\
+ libghdl.vhdl__nodes_meta__has_complete_type_definition
+
+Has_Incomplete_Type_Ref_Chain =\
+ libghdl.vhdl__nodes_meta__has_incomplete_type_ref_chain
+
+Has_Associated_Type =\
+ libghdl.vhdl__nodes_meta__has_associated_type
+
+Has_Enumeration_Literal_List =\
+ libghdl.vhdl__nodes_meta__has_enumeration_literal_list
+
+Has_Entity_Class_Entry_Chain =\
+ libghdl.vhdl__nodes_meta__has_entity_class_entry_chain
+
+Has_Group_Constituent_List =\
+ libghdl.vhdl__nodes_meta__has_group_constituent_list
+
+Has_Unit_Chain =\
+ libghdl.vhdl__nodes_meta__has_unit_chain
+
+Has_Primary_Unit =\
+ libghdl.vhdl__nodes_meta__has_primary_unit
+
+Has_Identifier =\
+ libghdl.vhdl__nodes_meta__has_identifier
+
+Has_Label =\
+ libghdl.vhdl__nodes_meta__has_label
+
+Has_Visible_Flag =\
+ libghdl.vhdl__nodes_meta__has_visible_flag
+
+Has_Range_Constraint =\
+ libghdl.vhdl__nodes_meta__has_range_constraint
+
+Has_Direction =\
+ libghdl.vhdl__nodes_meta__has_direction
+
+Has_Left_Limit =\
+ libghdl.vhdl__nodes_meta__has_left_limit
+
+Has_Right_Limit =\
+ libghdl.vhdl__nodes_meta__has_right_limit
+
+Has_Left_Limit_Expr =\
+ libghdl.vhdl__nodes_meta__has_left_limit_expr
+
+Has_Right_Limit_Expr =\
+ libghdl.vhdl__nodes_meta__has_right_limit_expr
+
+Has_Parent_Type =\
+ libghdl.vhdl__nodes_meta__has_parent_type
+
+Has_Simple_Nature =\
+ libghdl.vhdl__nodes_meta__has_simple_nature
+
+Has_Base_Nature =\
+ libghdl.vhdl__nodes_meta__has_base_nature
+
+Has_Resolution_Indication =\
+ libghdl.vhdl__nodes_meta__has_resolution_indication
+
+Has_Record_Element_Resolution_Chain =\
+ libghdl.vhdl__nodes_meta__has_record_element_resolution_chain
+
+Has_Tolerance =\
+ libghdl.vhdl__nodes_meta__has_tolerance
+
+Has_Plus_Terminal_Name =\
+ libghdl.vhdl__nodes_meta__has_plus_terminal_name
+
+Has_Minus_Terminal_Name =\
+ libghdl.vhdl__nodes_meta__has_minus_terminal_name
+
+Has_Plus_Terminal =\
+ libghdl.vhdl__nodes_meta__has_plus_terminal
+
+Has_Minus_Terminal =\
+ libghdl.vhdl__nodes_meta__has_minus_terminal
+
+Has_Magnitude_Expression =\
+ libghdl.vhdl__nodes_meta__has_magnitude_expression
+
+Has_Phase_Expression =\
+ libghdl.vhdl__nodes_meta__has_phase_expression
+
+Has_Power_Expression =\
+ libghdl.vhdl__nodes_meta__has_power_expression
+
+Has_Simultaneous_Left =\
+ libghdl.vhdl__nodes_meta__has_simultaneous_left
+
+Has_Simultaneous_Right =\
+ libghdl.vhdl__nodes_meta__has_simultaneous_right
+
+Has_Text_File_Flag =\
+ libghdl.vhdl__nodes_meta__has_text_file_flag
+
+Has_Only_Characters_Flag =\
+ libghdl.vhdl__nodes_meta__has_only_characters_flag
+
+Has_Is_Character_Type =\
+ libghdl.vhdl__nodes_meta__has_is_character_type
+
+Has_Nature_Staticness =\
+ libghdl.vhdl__nodes_meta__has_nature_staticness
+
+Has_Type_Staticness =\
+ libghdl.vhdl__nodes_meta__has_type_staticness
+
+Has_Constraint_State =\
+ libghdl.vhdl__nodes_meta__has_constraint_state
+
+Has_Index_Subtype_List =\
+ libghdl.vhdl__nodes_meta__has_index_subtype_list
+
+Has_Index_Subtype_Definition_List =\
+ libghdl.vhdl__nodes_meta__has_index_subtype_definition_list
+
+Has_Element_Subtype_Indication =\
+ libghdl.vhdl__nodes_meta__has_element_subtype_indication
+
+Has_Element_Subtype =\
+ libghdl.vhdl__nodes_meta__has_element_subtype
+
+Has_Element_Subnature_Indication =\
+ libghdl.vhdl__nodes_meta__has_element_subnature_indication
+
+Has_Element_Subnature =\
+ libghdl.vhdl__nodes_meta__has_element_subnature
+
+Has_Index_Constraint_List =\
+ libghdl.vhdl__nodes_meta__has_index_constraint_list
+
+Has_Array_Element_Constraint =\
+ libghdl.vhdl__nodes_meta__has_array_element_constraint
+
+Has_Elements_Declaration_List =\
+ libghdl.vhdl__nodes_meta__has_elements_declaration_list
+
+Has_Owned_Elements_Chain =\
+ libghdl.vhdl__nodes_meta__has_owned_elements_chain
+
+Has_Designated_Type =\
+ libghdl.vhdl__nodes_meta__has_designated_type
+
+Has_Designated_Subtype_Indication =\
+ libghdl.vhdl__nodes_meta__has_designated_subtype_indication
+
+Has_Index_List =\
+ libghdl.vhdl__nodes_meta__has_index_list
+
+Has_Reference =\
+ libghdl.vhdl__nodes_meta__has_reference
+
+Has_Nature_Declarator =\
+ libghdl.vhdl__nodes_meta__has_nature_declarator
+
+Has_Across_Type_Mark =\
+ libghdl.vhdl__nodes_meta__has_across_type_mark
+
+Has_Through_Type_Mark =\
+ libghdl.vhdl__nodes_meta__has_through_type_mark
+
+Has_Across_Type_Definition =\
+ libghdl.vhdl__nodes_meta__has_across_type_definition
+
+Has_Through_Type_Definition =\
+ libghdl.vhdl__nodes_meta__has_through_type_definition
+
+Has_Across_Type =\
+ libghdl.vhdl__nodes_meta__has_across_type
+
+Has_Through_Type =\
+ libghdl.vhdl__nodes_meta__has_through_type
+
+Has_Target =\
+ libghdl.vhdl__nodes_meta__has_target
+
+Has_Waveform_Chain =\
+ libghdl.vhdl__nodes_meta__has_waveform_chain
+
+Has_Guard =\
+ libghdl.vhdl__nodes_meta__has_guard
+
+Has_Delay_Mechanism =\
+ libghdl.vhdl__nodes_meta__has_delay_mechanism
+
+Has_Reject_Time_Expression =\
+ libghdl.vhdl__nodes_meta__has_reject_time_expression
+
+Has_Force_Mode =\
+ libghdl.vhdl__nodes_meta__has_force_mode
+
+Has_Has_Force_Mode =\
+ libghdl.vhdl__nodes_meta__has_has_force_mode
+
+Has_Sensitivity_List =\
+ libghdl.vhdl__nodes_meta__has_sensitivity_list
+
+Has_Process_Origin =\
+ libghdl.vhdl__nodes_meta__has_process_origin
+
+Has_Package_Origin =\
+ libghdl.vhdl__nodes_meta__has_package_origin
+
+Has_Condition_Clause =\
+ libghdl.vhdl__nodes_meta__has_condition_clause
+
+Has_Break_Element =\
+ libghdl.vhdl__nodes_meta__has_break_element
+
+Has_Selector_Quantity =\
+ libghdl.vhdl__nodes_meta__has_selector_quantity
+
+Has_Break_Quantity =\
+ libghdl.vhdl__nodes_meta__has_break_quantity
+
+Has_Timeout_Clause =\
+ libghdl.vhdl__nodes_meta__has_timeout_clause
+
+Has_Postponed_Flag =\
+ libghdl.vhdl__nodes_meta__has_postponed_flag
+
+Has_Callees_List =\
+ libghdl.vhdl__nodes_meta__has_callees_list
+
+Has_Passive_Flag =\
+ libghdl.vhdl__nodes_meta__has_passive_flag
+
+Has_Resolution_Function_Flag =\
+ libghdl.vhdl__nodes_meta__has_resolution_function_flag
+
+Has_Wait_State =\
+ libghdl.vhdl__nodes_meta__has_wait_state
+
+Has_All_Sensitized_State =\
+ libghdl.vhdl__nodes_meta__has_all_sensitized_state
+
+Has_Seen_Flag =\
+ libghdl.vhdl__nodes_meta__has_seen_flag
+
+Has_Pure_Flag =\
+ libghdl.vhdl__nodes_meta__has_pure_flag
+
+Has_Foreign_Flag =\
+ libghdl.vhdl__nodes_meta__has_foreign_flag
+
+Has_Resolved_Flag =\
+ libghdl.vhdl__nodes_meta__has_resolved_flag
+
+Has_Signal_Type_Flag =\
+ libghdl.vhdl__nodes_meta__has_signal_type_flag
+
+Has_Has_Signal_Flag =\
+ libghdl.vhdl__nodes_meta__has_has_signal_flag
+
+Has_Purity_State =\
+ libghdl.vhdl__nodes_meta__has_purity_state
+
+Has_Elab_Flag =\
+ libghdl.vhdl__nodes_meta__has_elab_flag
+
+Has_Vendor_Library_Flag =\
+ libghdl.vhdl__nodes_meta__has_vendor_library_flag
+
+Has_Configuration_Mark_Flag =\
+ libghdl.vhdl__nodes_meta__has_configuration_mark_flag
+
+Has_Configuration_Done_Flag =\
+ libghdl.vhdl__nodes_meta__has_configuration_done_flag
+
+Has_Index_Constraint_Flag =\
+ libghdl.vhdl__nodes_meta__has_index_constraint_flag
+
+Has_Hide_Implicit_Flag =\
+ libghdl.vhdl__nodes_meta__has_hide_implicit_flag
+
+Has_Assertion_Condition =\
+ libghdl.vhdl__nodes_meta__has_assertion_condition
+
+Has_Report_Expression =\
+ libghdl.vhdl__nodes_meta__has_report_expression
+
+Has_Severity_Expression =\
+ libghdl.vhdl__nodes_meta__has_severity_expression
+
+Has_Instantiated_Unit =\
+ libghdl.vhdl__nodes_meta__has_instantiated_unit
+
+Has_Generic_Map_Aspect_Chain =\
+ libghdl.vhdl__nodes_meta__has_generic_map_aspect_chain
+
+Has_Port_Map_Aspect_Chain =\
+ libghdl.vhdl__nodes_meta__has_port_map_aspect_chain
+
+Has_Configuration_Name =\
+ libghdl.vhdl__nodes_meta__has_configuration_name
+
+Has_Component_Configuration =\
+ libghdl.vhdl__nodes_meta__has_component_configuration
+
+Has_Configuration_Specification =\
+ libghdl.vhdl__nodes_meta__has_configuration_specification
+
+Has_Default_Binding_Indication =\
+ libghdl.vhdl__nodes_meta__has_default_binding_indication
+
+Has_Default_Configuration_Declaration =\
+ libghdl.vhdl__nodes_meta__has_default_configuration_declaration
+
+Has_Expression =\
+ libghdl.vhdl__nodes_meta__has_expression
+
+Has_Conditional_Expression_Chain =\
+ libghdl.vhdl__nodes_meta__has_conditional_expression_chain
+
+Has_Allocator_Designated_Type =\
+ libghdl.vhdl__nodes_meta__has_allocator_designated_type
+
+Has_Selected_Waveform_Chain =\
+ libghdl.vhdl__nodes_meta__has_selected_waveform_chain
+
+Has_Conditional_Waveform_Chain =\
+ libghdl.vhdl__nodes_meta__has_conditional_waveform_chain
+
+Has_Guard_Expression =\
+ libghdl.vhdl__nodes_meta__has_guard_expression
+
+Has_Guard_Decl =\
+ libghdl.vhdl__nodes_meta__has_guard_decl
+
+Has_Guard_Sensitivity_List =\
+ libghdl.vhdl__nodes_meta__has_guard_sensitivity_list
+
+Has_Signal_Attribute_Chain =\
+ libghdl.vhdl__nodes_meta__has_signal_attribute_chain
+
+Has_Block_Block_Configuration =\
+ libghdl.vhdl__nodes_meta__has_block_block_configuration
+
+Has_Package_Header =\
+ libghdl.vhdl__nodes_meta__has_package_header
+
+Has_Block_Header =\
+ libghdl.vhdl__nodes_meta__has_block_header
+
+Has_Uninstantiated_Package_Name =\
+ libghdl.vhdl__nodes_meta__has_uninstantiated_package_name
+
+Has_Uninstantiated_Package_Decl =\
+ libghdl.vhdl__nodes_meta__has_uninstantiated_package_decl
+
+Has_Instance_Source_File =\
+ libghdl.vhdl__nodes_meta__has_instance_source_file
+
+Has_Generate_Block_Configuration =\
+ libghdl.vhdl__nodes_meta__has_generate_block_configuration
+
+Has_Generate_Statement_Body =\
+ libghdl.vhdl__nodes_meta__has_generate_statement_body
+
+Has_Alternative_Label =\
+ libghdl.vhdl__nodes_meta__has_alternative_label
+
+Has_Generate_Else_Clause =\
+ libghdl.vhdl__nodes_meta__has_generate_else_clause
+
+Has_Condition =\
+ libghdl.vhdl__nodes_meta__has_condition
+
+Has_Else_Clause =\
+ libghdl.vhdl__nodes_meta__has_else_clause
+
+Has_Parameter_Specification =\
+ libghdl.vhdl__nodes_meta__has_parameter_specification
+
+Has_Parent =\
+ libghdl.vhdl__nodes_meta__has_parent
+
+Has_Loop_Label =\
+ libghdl.vhdl__nodes_meta__has_loop_label
+
+Has_Exit_Flag =\
+ libghdl.vhdl__nodes_meta__has_exit_flag
+
+Has_Next_Flag =\
+ libghdl.vhdl__nodes_meta__has_next_flag
+
+Has_Component_Name =\
+ libghdl.vhdl__nodes_meta__has_component_name
+
+Has_Instantiation_List =\
+ libghdl.vhdl__nodes_meta__has_instantiation_list
+
+Has_Entity_Aspect =\
+ libghdl.vhdl__nodes_meta__has_entity_aspect
+
+Has_Default_Entity_Aspect =\
+ libghdl.vhdl__nodes_meta__has_default_entity_aspect
+
+Has_Binding_Indication =\
+ libghdl.vhdl__nodes_meta__has_binding_indication
+
+Has_Named_Entity =\
+ libghdl.vhdl__nodes_meta__has_named_entity
+
+Has_Alias_Declaration =\
+ libghdl.vhdl__nodes_meta__has_alias_declaration
+
+Has_Referenced_Name =\
+ libghdl.vhdl__nodes_meta__has_referenced_name
+
+Has_Expr_Staticness =\
+ libghdl.vhdl__nodes_meta__has_expr_staticness
+
+Has_Scalar_Size =\
+ libghdl.vhdl__nodes_meta__has_scalar_size
+
+Has_Error_Origin =\
+ libghdl.vhdl__nodes_meta__has_error_origin
+
+Has_Operand =\
+ libghdl.vhdl__nodes_meta__has_operand
+
+Has_Left =\
+ libghdl.vhdl__nodes_meta__has_left
+
+Has_Right =\
+ libghdl.vhdl__nodes_meta__has_right
+
+Has_Unit_Name =\
+ libghdl.vhdl__nodes_meta__has_unit_name
+
+Has_Name =\
+ libghdl.vhdl__nodes_meta__has_name
+
+Has_Group_Template_Name =\
+ libghdl.vhdl__nodes_meta__has_group_template_name
+
+Has_Name_Staticness =\
+ libghdl.vhdl__nodes_meta__has_name_staticness
+
+Has_Prefix =\
+ libghdl.vhdl__nodes_meta__has_prefix
+
+Has_Signature_Prefix =\
+ libghdl.vhdl__nodes_meta__has_signature_prefix
+
+Has_External_Pathname =\
+ libghdl.vhdl__nodes_meta__has_external_pathname
+
+Has_Pathname_Suffix =\
+ libghdl.vhdl__nodes_meta__has_pathname_suffix
+
+Has_Pathname_Expression =\
+ libghdl.vhdl__nodes_meta__has_pathname_expression
+
+Has_In_Formal_Flag =\
+ libghdl.vhdl__nodes_meta__has_in_formal_flag
+
+Has_Slice_Subtype =\
+ libghdl.vhdl__nodes_meta__has_slice_subtype
+
+Has_Suffix =\
+ libghdl.vhdl__nodes_meta__has_suffix
+
+Has_Index_Subtype =\
+ libghdl.vhdl__nodes_meta__has_index_subtype
+
+Has_Parameter =\
+ libghdl.vhdl__nodes_meta__has_parameter
+
+Has_Parameter_2 =\
+ libghdl.vhdl__nodes_meta__has_parameter_2
+
+Has_Parameter_3 =\
+ libghdl.vhdl__nodes_meta__has_parameter_3
+
+Has_Parameter_4 =\
+ libghdl.vhdl__nodes_meta__has_parameter_4
+
+Has_Attr_Chain =\
+ libghdl.vhdl__nodes_meta__has_attr_chain
+
+Has_Signal_Attribute_Declaration =\
+ libghdl.vhdl__nodes_meta__has_signal_attribute_declaration
+
+Has_Actual_Type =\
+ libghdl.vhdl__nodes_meta__has_actual_type
+
+Has_Actual_Type_Definition =\
+ libghdl.vhdl__nodes_meta__has_actual_type_definition
+
+Has_Association_Chain =\
+ libghdl.vhdl__nodes_meta__has_association_chain
+
+Has_Individual_Association_Chain =\
+ libghdl.vhdl__nodes_meta__has_individual_association_chain
+
+Has_Subprogram_Association_Chain =\
+ libghdl.vhdl__nodes_meta__has_subprogram_association_chain
+
+Has_Aggregate_Info =\
+ libghdl.vhdl__nodes_meta__has_aggregate_info
+
+Has_Sub_Aggregate_Info =\
+ libghdl.vhdl__nodes_meta__has_sub_aggregate_info
+
+Has_Aggr_Dynamic_Flag =\
+ libghdl.vhdl__nodes_meta__has_aggr_dynamic_flag
+
+Has_Aggr_Min_Length =\
+ libghdl.vhdl__nodes_meta__has_aggr_min_length
+
+Has_Aggr_Low_Limit =\
+ libghdl.vhdl__nodes_meta__has_aggr_low_limit
+
+Has_Aggr_High_Limit =\
+ libghdl.vhdl__nodes_meta__has_aggr_high_limit
+
+Has_Aggr_Others_Flag =\
+ libghdl.vhdl__nodes_meta__has_aggr_others_flag
+
+Has_Aggr_Named_Flag =\
+ libghdl.vhdl__nodes_meta__has_aggr_named_flag
+
+Has_Aggregate_Expand_Flag =\
+ libghdl.vhdl__nodes_meta__has_aggregate_expand_flag
+
+Has_Association_Choices_Chain =\
+ libghdl.vhdl__nodes_meta__has_association_choices_chain
+
+Has_Case_Statement_Alternative_Chain =\
+ libghdl.vhdl__nodes_meta__has_case_statement_alternative_chain
+
+Has_Choice_Staticness =\
+ libghdl.vhdl__nodes_meta__has_choice_staticness
+
+Has_Procedure_Call =\
+ libghdl.vhdl__nodes_meta__has_procedure_call
+
+Has_Implementation =\
+ libghdl.vhdl__nodes_meta__has_implementation
+
+Has_Parameter_Association_Chain =\
+ libghdl.vhdl__nodes_meta__has_parameter_association_chain
+
+Has_Method_Object =\
+ libghdl.vhdl__nodes_meta__has_method_object
+
+Has_Subtype_Type_Mark =\
+ libghdl.vhdl__nodes_meta__has_subtype_type_mark
+
+Has_Subnature_Nature_Mark =\
+ libghdl.vhdl__nodes_meta__has_subnature_nature_mark
+
+Has_Type_Conversion_Subtype =\
+ libghdl.vhdl__nodes_meta__has_type_conversion_subtype
+
+Has_Type_Mark =\
+ libghdl.vhdl__nodes_meta__has_type_mark
+
+Has_File_Type_Mark =\
+ libghdl.vhdl__nodes_meta__has_file_type_mark
+
+Has_Return_Type_Mark =\
+ libghdl.vhdl__nodes_meta__has_return_type_mark
+
+Has_Has_Disconnect_Flag =\
+ libghdl.vhdl__nodes_meta__has_has_disconnect_flag
+
+Has_Has_Active_Flag =\
+ libghdl.vhdl__nodes_meta__has_has_active_flag
+
+Has_Is_Within_Flag =\
+ libghdl.vhdl__nodes_meta__has_is_within_flag
+
+Has_Type_Marks_List =\
+ libghdl.vhdl__nodes_meta__has_type_marks_list
+
+Has_Implicit_Alias_Flag =\
+ libghdl.vhdl__nodes_meta__has_implicit_alias_flag
+
+Has_Alias_Signature =\
+ libghdl.vhdl__nodes_meta__has_alias_signature
+
+Has_Attribute_Signature =\
+ libghdl.vhdl__nodes_meta__has_attribute_signature
+
+Has_Overload_List =\
+ libghdl.vhdl__nodes_meta__has_overload_list
+
+Has_Simple_Name_Identifier =\
+ libghdl.vhdl__nodes_meta__has_simple_name_identifier
+
+Has_Simple_Name_Subtype =\
+ libghdl.vhdl__nodes_meta__has_simple_name_subtype
+
+Has_Protected_Type_Body =\
+ libghdl.vhdl__nodes_meta__has_protected_type_body
+
+Has_Protected_Type_Declaration =\
+ libghdl.vhdl__nodes_meta__has_protected_type_declaration
+
+Has_Use_Flag =\
+ libghdl.vhdl__nodes_meta__has_use_flag
+
+Has_End_Has_Reserved_Id =\
+ libghdl.vhdl__nodes_meta__has_end_has_reserved_id
+
+Has_End_Has_Identifier =\
+ libghdl.vhdl__nodes_meta__has_end_has_identifier
+
+Has_End_Has_Postponed =\
+ libghdl.vhdl__nodes_meta__has_end_has_postponed
+
+Has_Has_Label =\
+ libghdl.vhdl__nodes_meta__has_has_label
+
+Has_Has_Begin =\
+ libghdl.vhdl__nodes_meta__has_has_begin
+
+Has_Has_End =\
+ libghdl.vhdl__nodes_meta__has_has_end
+
+Has_Has_Is =\
+ libghdl.vhdl__nodes_meta__has_has_is
+
+Has_Has_Pure =\
+ libghdl.vhdl__nodes_meta__has_has_pure
+
+Has_Has_Body =\
+ libghdl.vhdl__nodes_meta__has_has_body
+
+Has_Has_Parameter =\
+ libghdl.vhdl__nodes_meta__has_has_parameter
+
+Has_Has_Component =\
+ libghdl.vhdl__nodes_meta__has_has_component
+
+Has_Has_Identifier_List =\
+ libghdl.vhdl__nodes_meta__has_has_identifier_list
+
+Has_Has_Mode =\
+ libghdl.vhdl__nodes_meta__has_has_mode
+
+Has_Has_Class =\
+ libghdl.vhdl__nodes_meta__has_has_class
+
+Has_Has_Delay_Mechanism =\
+ libghdl.vhdl__nodes_meta__has_has_delay_mechanism
+
+Has_Suspend_Flag =\
+ libghdl.vhdl__nodes_meta__has_suspend_flag
+
+Has_Is_Ref =\
+ libghdl.vhdl__nodes_meta__has_is_ref
+
+Has_Is_Forward_Ref =\
+ libghdl.vhdl__nodes_meta__has_is_forward_ref
+
+Has_Psl_Property =\
+ libghdl.vhdl__nodes_meta__has_psl_property
+
+Has_Psl_Sequence =\
+ libghdl.vhdl__nodes_meta__has_psl_sequence
+
+Has_Psl_Declaration =\
+ libghdl.vhdl__nodes_meta__has_psl_declaration
+
+Has_Psl_Expression =\
+ libghdl.vhdl__nodes_meta__has_psl_expression
+
+Has_Psl_Boolean =\
+ libghdl.vhdl__nodes_meta__has_psl_boolean
+
+Has_PSL_Clock =\
+ libghdl.vhdl__nodes_meta__has_psl_clock
+
+Has_PSL_NFA =\
+ libghdl.vhdl__nodes_meta__has_psl_nfa
+
+Has_PSL_Nbr_States =\
+ libghdl.vhdl__nodes_meta__has_psl_nbr_states
+
+Has_PSL_Clock_Sensitivity =\
+ libghdl.vhdl__nodes_meta__has_psl_clock_sensitivity
+
+Has_PSL_EOS_Flag =\
+ libghdl.vhdl__nodes_meta__has_psl_eos_flag
+
+Has_Count_Expression =\
+ libghdl.vhdl__nodes_meta__has_count_expression
+
+Has_Clock_Expression =\
+ libghdl.vhdl__nodes_meta__has_clock_expression
+
+Has_Default_Clock =\
+ libghdl.vhdl__nodes_meta__has_default_clock
diff --git a/python/libghdl/thin/vhdl/nodes_utils.py b/pyGHDL/libghdl/vhdl/nodes_utils.py
index caee7ac4a..b6110e541 100644
--- a/python/libghdl/thin/vhdl/nodes_utils.py
+++ b/pyGHDL/libghdl/vhdl/nodes_utils.py
@@ -1,4 +1,5 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
+
Strip_Denoting_Name = libghdl.vhdl__utils__strip_denoting_name
diff --git a/python/libghdl/thin/vhdl/parse.py b/pyGHDL/libghdl/vhdl/parse.py
index 4fff64b84..b09056128 100644
--- a/python/libghdl/thin/vhdl/parse.py
+++ b/pyGHDL/libghdl/vhdl/parse.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_bool
+
Parse_Design_File = libghdl.vhdl__parse__parse_design_file
Flag_Parse_Parenthesis = c_bool.in_dll(libghdl, "vhdl__parse__flag_parse_parenthesis")
diff --git a/python/libghdl/thin/vhdl/scanner.py b/pyGHDL/libghdl/vhdl/scanner.py
index 8cea66ba3..765986f85 100644
--- a/python/libghdl/thin/vhdl/scanner.py
+++ b/pyGHDL/libghdl/vhdl/scanner.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int, c_bool
+
Set_File = libghdl.vhdl__scanner__set_file
Close_File = libghdl.vhdl__scanner__close_file
diff --git a/python/libghdl/thin/vhdl/sem.py b/pyGHDL/libghdl/vhdl/sem.py
index df82435da..577d16eeb 100644
--- a/python/libghdl/thin/vhdl/sem.py
+++ b/pyGHDL/libghdl/vhdl/sem.py
@@ -1,3 +1,4 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
+
Semantic = libghdl.vhdl__sem__semantic
diff --git a/python/libghdl/thin/vhdl/sem_lib.py b/pyGHDL/libghdl/vhdl/sem_lib.py
index 36559ec5e..cf1f9cf32 100644
--- a/python/libghdl/thin/vhdl/sem_lib.py
+++ b/pyGHDL/libghdl/vhdl/sem_lib.py
@@ -1,4 +1,5 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
+
Load_File = libghdl.vhdl__sem_lib__load_file
diff --git a/python/libghdl/thin/vhdl/std_package.py b/pyGHDL/libghdl/vhdl/std_package.py
index d999ae8b9..a4db2a1f2 100644
--- a/python/libghdl/thin/vhdl/std_package.py
+++ b/pyGHDL/libghdl/vhdl/std_package.py
@@ -1,6 +1,7 @@
-from libghdl import libghdl
+from pyGHDL.libghdl import libghdl
from ctypes import c_int32
+
# Use .value
Std_Location = c_int32.in_dll(libghdl, "vhdl__std_package__std_location")
diff --git a/python/libghdl/thin/vhdl/tokens.py b/pyGHDL/libghdl/vhdl/tokens.py
index 002e7ca82..e66f97c27 100644
--- a/python/libghdl/thin/vhdl/tokens.py
+++ b/pyGHDL/libghdl/vhdl/tokens.py
@@ -1,3 +1,5 @@
+
+
class Tok:
Invalid = 0
Left_Paren = 1
diff --git a/python/README b/pyGHDL/lsp/README
index c82ccc4d4..f9595f15f 100644
--- a/python/README
+++ b/pyGHDL/lsp/README
@@ -9,7 +9,7 @@ develop tools around the parser and analyzer.
To install:
1) First install ghdl (add --enable-python during configuration).
This is needed so that the libraries are available
-2) In ghdl/python, install pyghdl. There is a setup.py script, so you can do:
+2) In ghdl, install pyGHDL. There is a setup.py script, so you can do:
$ pip install .
To install for development: pip install -e .
Add --user to install in your home directory.
diff --git a/pyGHDL/lsp/__init__.py b/pyGHDL/lsp/__init__.py
new file mode 100644
index 000000000..ee748ba8a
--- /dev/null
+++ b/pyGHDL/lsp/__init__.py
@@ -0,0 +1,23 @@
+class LSPConnTrace(object):
+ """Wrapper class to save in and out packets"""
+
+ def __init__(self, basename, conn):
+ self.conn = conn
+ self.trace_in = open(basename + ".in", "w")
+ self.trace_out = open(basename + ".out", "w")
+
+ def readline(self):
+ res = self.conn.readline()
+ self.trace_in.write(res)
+ return res
+
+ def read(self, size):
+ res = self.conn.read(size)
+ self.trace_in.write(res)
+ self.trace_in.flush()
+ return res
+
+ def write(self, out):
+ self.conn.write(out)
+ self.trace_out.write(out)
+ self.trace_out.flush()
diff --git a/python/vhdl_langserver/document.py b/pyGHDL/lsp/document.py
index 82d11fe56..1b988220c 100644
--- a/python/vhdl_langserver/document.py
+++ b/pyGHDL/lsp/document.py
@@ -1,14 +1,14 @@
import ctypes
import logging
import os
-import libghdl.thin.name_table as name_table
-import libghdl.thin.files_map as files_map
-import libghdl.thin.files_map_editor as files_map_editor
-import libghdl.thin.libraries as libraries
-import libghdl.thin.vhdl.nodes as nodes
-import libghdl.thin.vhdl.sem_lib as sem_lib
-import libghdl.thin.vhdl.sem as sem
-import libghdl.thin.vhdl.formatters as formatters
+import pyGHDL.libghdl.name_table as name_table
+import pyGHDL.libghdl.files_map as files_map
+import pyGHDL.libghdl.files_map_editor as files_map_editor
+import pyGHDL.libghdl.libraries as libraries
+import pyGHDL.libghdl.vhdl.nodes as nodes
+import pyGHDL.libghdl.vhdl.sem_lib as sem_lib
+import pyGHDL.libghdl.vhdl.sem as sem
+import pyGHDL.libghdl.vhdl.formatters as formatters
from . import symbols, references
@@ -67,7 +67,7 @@ class Document(object):
if not change_range:
# The whole file has changed
raise AssertionError
- # if len(text_bytes) < thin.Files_Map.Get_Buffer_Length(self._fe):
+ # if len(text_bytes) < libghdl.Files_Map.Get_Buffer_Length(self._fe):
# xxxx_replace
# else:
# xxxx_free
diff --git a/python/vhdl_langserver/lsp.py b/pyGHDL/lsp/lsp.py
index 60f32be76..60f32be76 100644
--- a/python/vhdl_langserver/lsp.py
+++ b/pyGHDL/lsp/lsp.py
diff --git a/python/vhdl_langserver/lsptools.py b/pyGHDL/lsp/lsptools.py
index 648f0a8c0..648f0a8c0 100644
--- a/python/vhdl_langserver/lsptools.py
+++ b/pyGHDL/lsp/lsptools.py
diff --git a/python/vhdl_langserver/references.py b/pyGHDL/lsp/references.py
index f716548eb..65bbeead4 100644
--- a/python/vhdl_langserver/references.py
+++ b/pyGHDL/lsp/references.py
@@ -1,8 +1,8 @@
import logging
-import libghdl.thin.vhdl.nodes as nodes
-import libghdl.thin.vhdl.nodes_meta as nodes_meta
-import libghdl.thin.vhdl.pyutils as pyutils
-import libghdl.thin.name_table as name_table
+import pyGHDL.libghdl.vhdl.nodes as nodes
+import pyGHDL.libghdl.vhdl.nodes_meta as nodes_meta
+import pyGHDL.libghdl.name_table as name_table
+import pyGHDL.libghdl.utils as pyutils
log = logging.getLogger(__name__)
diff --git a/python/vhdl_langserver/symbols.py b/pyGHDL/lsp/symbols.py
index d0bd269de..3a0f1da30 100644
--- a/python/vhdl_langserver/symbols.py
+++ b/pyGHDL/lsp/symbols.py
@@ -1,9 +1,9 @@
-import libghdl.thin.name_table as name_table
-import libghdl.thin.files_map as files_map
-import libghdl.thin.vhdl.pyutils as pyutils
-import libghdl.thin.vhdl.nodes as nodes
-import libghdl.thin.vhdl.nodes_meta as nodes_meta
-import libghdl.thin.vhdl.elocations as elocations
+import pyGHDL.libghdl.name_table as name_table
+import pyGHDL.libghdl.files_map as files_map
+import pyGHDL.libghdl.vhdl.nodes as nodes
+import pyGHDL.libghdl.vhdl.nodes_meta as nodes_meta
+import pyGHDL.libghdl.vhdl.elocations as elocations
+import pyGHDL.libghdl.utils as pyutils
from . import lsp
diff --git a/python/vhdl_langserver/version.py b/pyGHDL/lsp/version.py
index 4b0d124d5..4b0d124d5 100644
--- a/python/vhdl_langserver/version.py
+++ b/pyGHDL/lsp/version.py
diff --git a/python/vhdl_langserver/vhdl_ls.py b/pyGHDL/lsp/vhdl_ls.py
index 61c4aed23..61c4aed23 100644
--- a/python/vhdl_langserver/vhdl_ls.py
+++ b/pyGHDL/lsp/vhdl_ls.py
diff --git a/python/vhdl_langserver/workspace.py b/pyGHDL/lsp/workspace.py
index 9d61225ee..19cdc5309 100644
--- a/python/vhdl_langserver/workspace.py
+++ b/pyGHDL/lsp/workspace.py
@@ -2,19 +2,19 @@ import logging
import os
import json
from ctypes import byref
-import libghdl
-import libghdl.thin.errorout_memory as errorout_memory
-import libghdl.thin.flags
-import libghdl.thin.errorout as errorout
-import libghdl.thin.files_map as files_map
-import libghdl.thin.libraries as libraries
-import libghdl.thin.name_table as name_table
-import libghdl.thin.vhdl.nodes as nodes
-import libghdl.thin.vhdl.lists as lists
-import libghdl.thin.vhdl.std_package as std_package
-import libghdl.thin.vhdl.parse
-import libghdl.thin.vhdl.pyutils as pyutils
-import libghdl.thin.vhdl.sem_lib as sem_lib
+import pyGHDL.libghdl as libghdl
+import pyGHDL.libghdl.errorout_memory as errorout_memory
+import pyGHDL.libghdl.flags
+import pyGHDL.libghdl.errorout as errorout
+import pyGHDL.libghdl.files_map as files_map
+import pyGHDL.libghdl.libraries as libraries
+import pyGHDL.libghdl.name_table as name_table
+import pyGHDL.libghdl.vhdl.nodes as nodes
+import pyGHDL.libghdl.vhdl.lists as lists
+import pyGHDL.libghdl.vhdl.std_package as std_package
+import pyGHDL.libghdl.vhdl.parse
+import pyGHDL.libghdl.vhdl.sem_lib as sem_lib
+import pyGHDL.libghdl.utils as pyutils
from . import lsp
from . import document, symbols
@@ -40,16 +40,16 @@ class Workspace(object):
self._prj = {}
self._last_linted_doc = None
errorout_memory.Install_Handler()
- libghdl.thin.flags.Flag_Elocations.value = True
- # thin.Flags.Verbose.value = True
+ libghdl.flags.Flag_Elocations.value = True
+ # libghdl.Flags.Verbose.value = True
# We do analysis even in case of errors.
- libghdl.thin.vhdl.parse.Flag_Parse_Parenthesis.value = True
+ libghdl.vhdl.parse.Flag_Parse_Parenthesis.value = True
# Force analysis to get more feedback + navigation even in case
# of errors.
- libghdl.thin.flags.Flag_Force_Analysis.value = True
+ libghdl.flags.Flag_Force_Analysis.value = True
# Do not consider analysis order issues.
- libghdl.thin.flags.Flag_Elaborate_With_Outdated.value = True
- libghdl.thin.errorout.Enable_Warning(errorout.Msgid.Warnid_Unused, True)
+ libghdl.flags.Flag_Elaborate_With_Outdated.value = True
+ libghdl.errorout.Enable_Warning(errorout.Msgid.Warnid_Unused, True)
self.read_project()
self.set_options_from_project()
libghdl.analyze_init()
diff --git a/pyGHDL/requirements.txt b/pyGHDL/requirements.txt
new file mode 100644
index 000000000..d373926f3
--- /dev/null
+++ b/pyGHDL/requirements.txt
@@ -0,0 +1,2 @@
+pydecor>=2.0.1
+pyVHDLModel>=0.7.3
diff --git a/python/ghdl-ls b/python/ghdl-ls
deleted file mode 100755
index 2fa44dcaa..000000000
--- a/python/ghdl-ls
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env python3
-import vhdl_langserver.main as main
-
-main.main()
diff --git a/python/libghdl/thin/vhdl/nodes_meta.py b/python/libghdl/thin/vhdl/nodes_meta.py
deleted file mode 100644
index 245a847cf..000000000
--- a/python/libghdl/thin/vhdl/nodes_meta.py
+++ /dev/null
@@ -1,1294 +0,0 @@
-from libghdl import libghdl
-
-
-# From nodes_meta
-get_fields_first = libghdl.vhdl__nodes_meta__get_fields_first
-
-get_fields_last = libghdl.vhdl__nodes_meta__get_fields_last
-
-get_field_by_index = libghdl.vhdl__nodes_meta__get_field_by_index
-
-get_field_type = libghdl.vhdl__nodes_meta__get_field_type
-
-get_field_attribute = libghdl.vhdl__nodes_meta__get_field_attribute
-
-
-class types:
- Boolean = 0
- Date_State_Type = 1
- Date_Type = 2
- Direction_Type = 3
- File_Checksum_Id = 4
- Fp64 = 5
- Iir = 6
- Iir_All_Sensitized = 7
- Iir_Constraint = 8
- Iir_Delay_Mechanism = 9
- Iir_Flist = 10
- Iir_Force_Mode = 11
- Iir_Index32 = 12
- Iir_Int32 = 13
- Iir_List = 14
- Iir_Mode = 15
- Iir_Predefined_Functions = 16
- Iir_Pure_State = 17
- Iir_Signal_Kind = 18
- Iir_Staticness = 19
- Int32 = 20
- Int64 = 21
- Name_Id = 22
- Number_Base_Type = 23
- PSL_NFA = 24
- PSL_Node = 25
- Scalar_Size = 26
- Source_File_Entry = 27
- Source_Ptr = 28
- String8_Id = 29
- Time_Stamp_Id = 30
- Token_Type = 31
- Tri_State_Type = 32
-
-
-class Attr:
- ANone = 0
- Chain = 1
- Chain_Next = 2
- Forward_Ref = 3
- Maybe_Forward_Ref = 4
- Maybe_Ref = 5
- Of_Maybe_Ref = 6
- Of_Ref = 7
- Ref = 8
-
-
-class fields:
- First_Design_Unit = 0
- Last_Design_Unit = 1
- Library_Declaration = 2
- File_Checksum = 3
- Analysis_Time_Stamp = 4
- Design_File_Source = 5
- Library = 6
- File_Dependence_List = 7
- Design_File_Filename = 8
- Design_File_Directory = 9
- Design_File = 10
- Design_File_Chain = 11
- Library_Directory = 12
- Date = 13
- Context_Items = 14
- Dependence_List = 15
- Analysis_Checks_List = 16
- Date_State = 17
- Guarded_Target_State = 18
- Library_Unit = 19
- Hash_Chain = 20
- Design_Unit_Source_Pos = 21
- Design_Unit_Source_Line = 22
- Design_Unit_Source_Col = 23
- Value = 24
- Enum_Pos = 25
- Physical_Literal = 26
- Fp_Value = 27
- Simple_Aggregate_List = 28
- String8_Id = 29
- String_Length = 30
- Bit_String_Base = 31
- Has_Signed = 32
- Has_Sign = 33
- Has_Length = 34
- Literal_Length = 35
- Literal_Origin = 36
- Range_Origin = 37
- Literal_Subtype = 38
- Allocator_Subtype = 39
- Entity_Class = 40
- Entity_Name_List = 41
- Attribute_Designator = 42
- Attribute_Specification_Chain = 43
- Attribute_Specification = 44
- Static_Attribute_Flag = 45
- Signal_List = 46
- Quantity_List = 47
- Designated_Entity = 48
- Formal = 49
- Actual = 50
- Actual_Conversion = 51
- Formal_Conversion = 52
- Whole_Association_Flag = 53
- Collapse_Signal_Flag = 54
- Artificial_Flag = 55
- Open_Flag = 56
- After_Drivers_Flag = 57
- We_Value = 58
- Time = 59
- Associated_Expr = 60
- Associated_Block = 61
- Associated_Chain = 62
- Choice_Name = 63
- Choice_Expression = 64
- Choice_Range = 65
- Same_Alternative_Flag = 66
- Element_Type_Flag = 67
- Architecture = 68
- Block_Specification = 69
- Prev_Block_Configuration = 70
- Configuration_Item_Chain = 71
- Attribute_Value_Chain = 72
- Spec_Chain = 73
- Value_Chain = 74
- Attribute_Value_Spec_Chain = 75
- Entity_Name = 76
- Package = 77
- Package_Body = 78
- Instance_Package_Body = 79
- Need_Body = 80
- Macro_Expanded_Flag = 81
- Need_Instance_Bodies = 82
- Hierarchical_Name = 83
- Inherit_Spec_Chain = 84
- Vunit_Item_Chain = 85
- Bound_Vunit_Chain = 86
- Verification_Block_Configuration = 87
- Block_Configuration = 88
- Concurrent_Statement_Chain = 89
- Chain = 90
- Port_Chain = 91
- Generic_Chain = 92
- Type = 93
- Subtype_Indication = 94
- Discrete_Range = 95
- Type_Definition = 96
- Subtype_Definition = 97
- Incomplete_Type_Declaration = 98
- Interface_Type_Subprograms = 99
- Nature_Definition = 100
- Nature = 101
- Subnature_Indication = 102
- Mode = 103
- Guarded_Signal_Flag = 104
- Signal_Kind = 105
- Base_Name = 106
- Interface_Declaration_Chain = 107
- Subprogram_Specification = 108
- Sequential_Statement_Chain = 109
- Simultaneous_Statement_Chain = 110
- Subprogram_Body = 111
- Overload_Number = 112
- Subprogram_Depth = 113
- Subprogram_Hash = 114
- Impure_Depth = 115
- Return_Type = 116
- Implicit_Definition = 117
- Uninstantiated_Subprogram_Name = 118
- Default_Value = 119
- Deferred_Declaration = 120
- Deferred_Declaration_Flag = 121
- Shared_Flag = 122
- Design_Unit = 123
- Block_Statement = 124
- Signal_Driver = 125
- Declaration_Chain = 126
- File_Logical_Name = 127
- File_Open_Kind = 128
- Element_Position = 129
- Use_Clause_Chain = 130
- Context_Reference_Chain = 131
- Selected_Name = 132
- Type_Declarator = 133
- Complete_Type_Definition = 134
- Incomplete_Type_Ref_Chain = 135
- Associated_Type = 136
- Enumeration_Literal_List = 137
- Entity_Class_Entry_Chain = 138
- Group_Constituent_List = 139
- Unit_Chain = 140
- Primary_Unit = 141
- Identifier = 142
- Label = 143
- Visible_Flag = 144
- Range_Constraint = 145
- Direction = 146
- Left_Limit = 147
- Right_Limit = 148
- Left_Limit_Expr = 149
- Right_Limit_Expr = 150
- Parent_Type = 151
- Simple_Nature = 152
- Base_Nature = 153
- Resolution_Indication = 154
- Record_Element_Resolution_Chain = 155
- Tolerance = 156
- Plus_Terminal_Name = 157
- Minus_Terminal_Name = 158
- Plus_Terminal = 159
- Minus_Terminal = 160
- Magnitude_Expression = 161
- Phase_Expression = 162
- Power_Expression = 163
- Simultaneous_Left = 164
- Simultaneous_Right = 165
- Text_File_Flag = 166
- Only_Characters_Flag = 167
- Is_Character_Type = 168
- Nature_Staticness = 169
- Type_Staticness = 170
- Constraint_State = 171
- Index_Subtype_List = 172
- Index_Subtype_Definition_List = 173
- Element_Subtype_Indication = 174
- Element_Subtype = 175
- Element_Subnature_Indication = 176
- Element_Subnature = 177
- Index_Constraint_List = 178
- Array_Element_Constraint = 179
- Elements_Declaration_List = 180
- Owned_Elements_Chain = 181
- Designated_Type = 182
- Designated_Subtype_Indication = 183
- Index_List = 184
- Reference = 185
- Nature_Declarator = 186
- Across_Type_Mark = 187
- Through_Type_Mark = 188
- Across_Type_Definition = 189
- Through_Type_Definition = 190
- Across_Type = 191
- Through_Type = 192
- Target = 193
- Waveform_Chain = 194
- Guard = 195
- Delay_Mechanism = 196
- Reject_Time_Expression = 197
- Force_Mode = 198
- Has_Force_Mode = 199
- Sensitivity_List = 200
- Process_Origin = 201
- Package_Origin = 202
- Condition_Clause = 203
- Break_Element = 204
- Selector_Quantity = 205
- Break_Quantity = 206
- Timeout_Clause = 207
- Postponed_Flag = 208
- Callees_List = 209
- Passive_Flag = 210
- Resolution_Function_Flag = 211
- Wait_State = 212
- All_Sensitized_State = 213
- Seen_Flag = 214
- Pure_Flag = 215
- Foreign_Flag = 216
- Resolved_Flag = 217
- Signal_Type_Flag = 218
- Has_Signal_Flag = 219
- Purity_State = 220
- Elab_Flag = 221
- Vendor_Library_Flag = 222
- Configuration_Mark_Flag = 223
- Configuration_Done_Flag = 224
- Index_Constraint_Flag = 225
- Hide_Implicit_Flag = 226
- Assertion_Condition = 227
- Report_Expression = 228
- Severity_Expression = 229
- Instantiated_Unit = 230
- Generic_Map_Aspect_Chain = 231
- Port_Map_Aspect_Chain = 232
- Configuration_Name = 233
- Component_Configuration = 234
- Configuration_Specification = 235
- Default_Binding_Indication = 236
- Default_Configuration_Declaration = 237
- Expression = 238
- Conditional_Expression_Chain = 239
- Allocator_Designated_Type = 240
- Selected_Waveform_Chain = 241
- Conditional_Waveform_Chain = 242
- Guard_Expression = 243
- Guard_Decl = 244
- Guard_Sensitivity_List = 245
- Signal_Attribute_Chain = 246
- Block_Block_Configuration = 247
- Package_Header = 248
- Block_Header = 249
- Uninstantiated_Package_Name = 250
- Uninstantiated_Package_Decl = 251
- Instance_Source_File = 252
- Generate_Block_Configuration = 253
- Generate_Statement_Body = 254
- Alternative_Label = 255
- Generate_Else_Clause = 256
- Condition = 257
- Else_Clause = 258
- Parameter_Specification = 259
- Parent = 260
- Loop_Label = 261
- Exit_Flag = 262
- Next_Flag = 263
- Component_Name = 264
- Instantiation_List = 265
- Entity_Aspect = 266
- Default_Entity_Aspect = 267
- Binding_Indication = 268
- Named_Entity = 269
- Alias_Declaration = 270
- Referenced_Name = 271
- Expr_Staticness = 272
- Scalar_Size = 273
- Error_Origin = 274
- Operand = 275
- Left = 276
- Right = 277
- Unit_Name = 278
- Name = 279
- Group_Template_Name = 280
- Name_Staticness = 281
- Prefix = 282
- Signature_Prefix = 283
- External_Pathname = 284
- Pathname_Suffix = 285
- Pathname_Expression = 286
- In_Formal_Flag = 287
- Slice_Subtype = 288
- Suffix = 289
- Index_Subtype = 290
- Parameter = 291
- Parameter_2 = 292
- Parameter_3 = 293
- Parameter_4 = 294
- Attr_Chain = 295
- Signal_Attribute_Declaration = 296
- Actual_Type = 297
- Actual_Type_Definition = 298
- Association_Chain = 299
- Individual_Association_Chain = 300
- Subprogram_Association_Chain = 301
- Aggregate_Info = 302
- Sub_Aggregate_Info = 303
- Aggr_Dynamic_Flag = 304
- Aggr_Min_Length = 305
- Aggr_Low_Limit = 306
- Aggr_High_Limit = 307
- Aggr_Others_Flag = 308
- Aggr_Named_Flag = 309
- Aggregate_Expand_Flag = 310
- Association_Choices_Chain = 311
- Case_Statement_Alternative_Chain = 312
- Choice_Staticness = 313
- Procedure_Call = 314
- Implementation = 315
- Parameter_Association_Chain = 316
- Method_Object = 317
- Subtype_Type_Mark = 318
- Subnature_Nature_Mark = 319
- Type_Conversion_Subtype = 320
- Type_Mark = 321
- File_Type_Mark = 322
- Return_Type_Mark = 323
- Has_Disconnect_Flag = 324
- Has_Active_Flag = 325
- Is_Within_Flag = 326
- Type_Marks_List = 327
- Implicit_Alias_Flag = 328
- Alias_Signature = 329
- Attribute_Signature = 330
- Overload_List = 331
- Simple_Name_Identifier = 332
- Simple_Name_Subtype = 333
- Protected_Type_Body = 334
- Protected_Type_Declaration = 335
- Use_Flag = 336
- End_Has_Reserved_Id = 337
- End_Has_Identifier = 338
- End_Has_Postponed = 339
- Has_Label = 340
- Has_Begin = 341
- Has_End = 342
- Has_Is = 343
- Has_Pure = 344
- Has_Body = 345
- Has_Parameter = 346
- Has_Component = 347
- Has_Identifier_List = 348
- Has_Mode = 349
- Has_Class = 350
- Has_Delay_Mechanism = 351
- Suspend_Flag = 352
- Is_Ref = 353
- Is_Forward_Ref = 354
- Psl_Property = 355
- Psl_Sequence = 356
- Psl_Declaration = 357
- Psl_Expression = 358
- Psl_Boolean = 359
- PSL_Clock = 360
- PSL_NFA = 361
- PSL_Nbr_States = 362
- PSL_Clock_Sensitivity = 363
- PSL_EOS_Flag = 364
- Count_Expression = 365
- Clock_Expression = 366
- Default_Clock = 367
-
-
-Get_Boolean = libghdl.vhdl__nodes_meta__get_boolean
-
-Get_Date_State_Type = libghdl.vhdl__nodes_meta__get_date_state_type
-
-Get_Date_Type = libghdl.vhdl__nodes_meta__get_date_type
-
-Get_Direction_Type = libghdl.vhdl__nodes_meta__get_direction_type
-
-Get_File_Checksum_Id = libghdl.vhdl__nodes_meta__get_file_checksum_id
-
-Get_Fp64 = libghdl.vhdl__nodes_meta__get_fp64
-
-Get_Iir = libghdl.vhdl__nodes_meta__get_iir
-
-Get_Iir_All_Sensitized = libghdl.vhdl__nodes_meta__get_iir_all_sensitized
-
-Get_Iir_Constraint = libghdl.vhdl__nodes_meta__get_iir_constraint
-
-Get_Iir_Delay_Mechanism = libghdl.vhdl__nodes_meta__get_iir_delay_mechanism
-
-Get_Iir_Flist = libghdl.vhdl__nodes_meta__get_iir_flist
-
-Get_Iir_Force_Mode = libghdl.vhdl__nodes_meta__get_iir_force_mode
-
-Get_Iir_Index32 = libghdl.vhdl__nodes_meta__get_iir_index32
-
-Get_Iir_Int32 = libghdl.vhdl__nodes_meta__get_iir_int32
-
-Get_Iir_List = libghdl.vhdl__nodes_meta__get_iir_list
-
-Get_Iir_Mode = libghdl.vhdl__nodes_meta__get_iir_mode
-
-Get_Iir_Predefined_Functions = libghdl.vhdl__nodes_meta__get_iir_predefined_functions
-
-Get_Iir_Pure_State = libghdl.vhdl__nodes_meta__get_iir_pure_state
-
-Get_Iir_Signal_Kind = libghdl.vhdl__nodes_meta__get_iir_signal_kind
-
-Get_Iir_Staticness = libghdl.vhdl__nodes_meta__get_iir_staticness
-
-Get_Int32 = libghdl.vhdl__nodes_meta__get_int32
-
-Get_Int64 = libghdl.vhdl__nodes_meta__get_int64
-
-Get_Name_Id = libghdl.vhdl__nodes_meta__get_name_id
-
-Get_Number_Base_Type = libghdl.vhdl__nodes_meta__get_number_base_type
-
-Get_PSL_NFA = libghdl.vhdl__nodes_meta__get_psl_nfa
-
-Get_PSL_Node = libghdl.vhdl__nodes_meta__get_psl_node
-
-Get_Scalar_Size = libghdl.vhdl__nodes_meta__get_scalar_size
-
-Get_Source_File_Entry = libghdl.vhdl__nodes_meta__get_source_file_entry
-
-Get_Source_Ptr = libghdl.vhdl__nodes_meta__get_source_ptr
-
-Get_String8_Id = libghdl.vhdl__nodes_meta__get_string8_id
-
-Get_Time_Stamp_Id = libghdl.vhdl__nodes_meta__get_time_stamp_id
-
-Get_Token_Type = libghdl.vhdl__nodes_meta__get_token_type
-
-Get_Tri_State_Type = libghdl.vhdl__nodes_meta__get_tri_state_type
-
-
-Has_First_Design_Unit = libghdl.vhdl__nodes_meta__has_first_design_unit
-
-Has_Last_Design_Unit = libghdl.vhdl__nodes_meta__has_last_design_unit
-
-Has_Library_Declaration = libghdl.vhdl__nodes_meta__has_library_declaration
-
-Has_File_Checksum = libghdl.vhdl__nodes_meta__has_file_checksum
-
-Has_Analysis_Time_Stamp = libghdl.vhdl__nodes_meta__has_analysis_time_stamp
-
-Has_Design_File_Source = libghdl.vhdl__nodes_meta__has_design_file_source
-
-Has_Library = libghdl.vhdl__nodes_meta__has_library
-
-Has_File_Dependence_List = libghdl.vhdl__nodes_meta__has_file_dependence_list
-
-Has_Design_File_Filename = libghdl.vhdl__nodes_meta__has_design_file_filename
-
-Has_Design_File_Directory = libghdl.vhdl__nodes_meta__has_design_file_directory
-
-Has_Design_File = libghdl.vhdl__nodes_meta__has_design_file
-
-Has_Design_File_Chain = libghdl.vhdl__nodes_meta__has_design_file_chain
-
-Has_Library_Directory = libghdl.vhdl__nodes_meta__has_library_directory
-
-Has_Date = libghdl.vhdl__nodes_meta__has_date
-
-Has_Context_Items = libghdl.vhdl__nodes_meta__has_context_items
-
-Has_Dependence_List = libghdl.vhdl__nodes_meta__has_dependence_list
-
-Has_Analysis_Checks_List = libghdl.vhdl__nodes_meta__has_analysis_checks_list
-
-Has_Date_State = libghdl.vhdl__nodes_meta__has_date_state
-
-Has_Guarded_Target_State = libghdl.vhdl__nodes_meta__has_guarded_target_state
-
-Has_Library_Unit = libghdl.vhdl__nodes_meta__has_library_unit
-
-Has_Hash_Chain = libghdl.vhdl__nodes_meta__has_hash_chain
-
-Has_Design_Unit_Source_Pos = libghdl.vhdl__nodes_meta__has_design_unit_source_pos
-
-Has_Design_Unit_Source_Line = libghdl.vhdl__nodes_meta__has_design_unit_source_line
-
-Has_Design_Unit_Source_Col = libghdl.vhdl__nodes_meta__has_design_unit_source_col
-
-Has_Value = libghdl.vhdl__nodes_meta__has_value
-
-Has_Enum_Pos = libghdl.vhdl__nodes_meta__has_enum_pos
-
-Has_Physical_Literal = libghdl.vhdl__nodes_meta__has_physical_literal
-
-Has_Fp_Value = libghdl.vhdl__nodes_meta__has_fp_value
-
-Has_Simple_Aggregate_List = libghdl.vhdl__nodes_meta__has_simple_aggregate_list
-
-Has_String8_Id = libghdl.vhdl__nodes_meta__has_string8_id
-
-Has_String_Length = libghdl.vhdl__nodes_meta__has_string_length
-
-Has_Bit_String_Base = libghdl.vhdl__nodes_meta__has_bit_string_base
-
-Has_Has_Signed = libghdl.vhdl__nodes_meta__has_has_signed
-
-Has_Has_Sign = libghdl.vhdl__nodes_meta__has_has_sign
-
-Has_Has_Length = libghdl.vhdl__nodes_meta__has_has_length
-
-Has_Literal_Length = libghdl.vhdl__nodes_meta__has_literal_length
-
-Has_Literal_Origin = libghdl.vhdl__nodes_meta__has_literal_origin
-
-Has_Range_Origin = libghdl.vhdl__nodes_meta__has_range_origin
-
-Has_Literal_Subtype = libghdl.vhdl__nodes_meta__has_literal_subtype
-
-Has_Allocator_Subtype = libghdl.vhdl__nodes_meta__has_allocator_subtype
-
-Has_Entity_Class = libghdl.vhdl__nodes_meta__has_entity_class
-
-Has_Entity_Name_List = libghdl.vhdl__nodes_meta__has_entity_name_list
-
-Has_Attribute_Designator = libghdl.vhdl__nodes_meta__has_attribute_designator
-
-Has_Attribute_Specification_Chain = (
- libghdl.vhdl__nodes_meta__has_attribute_specification_chain
-)
-
-Has_Attribute_Specification = libghdl.vhdl__nodes_meta__has_attribute_specification
-
-Has_Static_Attribute_Flag = libghdl.vhdl__nodes_meta__has_static_attribute_flag
-
-Has_Signal_List = libghdl.vhdl__nodes_meta__has_signal_list
-
-Has_Quantity_List = libghdl.vhdl__nodes_meta__has_quantity_list
-
-Has_Designated_Entity = libghdl.vhdl__nodes_meta__has_designated_entity
-
-Has_Formal = libghdl.vhdl__nodes_meta__has_formal
-
-Has_Actual = libghdl.vhdl__nodes_meta__has_actual
-
-Has_Actual_Conversion = libghdl.vhdl__nodes_meta__has_actual_conversion
-
-Has_Formal_Conversion = libghdl.vhdl__nodes_meta__has_formal_conversion
-
-Has_Whole_Association_Flag = libghdl.vhdl__nodes_meta__has_whole_association_flag
-
-Has_Collapse_Signal_Flag = libghdl.vhdl__nodes_meta__has_collapse_signal_flag
-
-Has_Artificial_Flag = libghdl.vhdl__nodes_meta__has_artificial_flag
-
-Has_Open_Flag = libghdl.vhdl__nodes_meta__has_open_flag
-
-Has_After_Drivers_Flag = libghdl.vhdl__nodes_meta__has_after_drivers_flag
-
-Has_We_Value = libghdl.vhdl__nodes_meta__has_we_value
-
-Has_Time = libghdl.vhdl__nodes_meta__has_time
-
-Has_Associated_Expr = libghdl.vhdl__nodes_meta__has_associated_expr
-
-Has_Associated_Block = libghdl.vhdl__nodes_meta__has_associated_block
-
-Has_Associated_Chain = libghdl.vhdl__nodes_meta__has_associated_chain
-
-Has_Choice_Name = libghdl.vhdl__nodes_meta__has_choice_name
-
-Has_Choice_Expression = libghdl.vhdl__nodes_meta__has_choice_expression
-
-Has_Choice_Range = libghdl.vhdl__nodes_meta__has_choice_range
-
-Has_Same_Alternative_Flag = libghdl.vhdl__nodes_meta__has_same_alternative_flag
-
-Has_Element_Type_Flag = libghdl.vhdl__nodes_meta__has_element_type_flag
-
-Has_Architecture = libghdl.vhdl__nodes_meta__has_architecture
-
-Has_Block_Specification = libghdl.vhdl__nodes_meta__has_block_specification
-
-Has_Prev_Block_Configuration = libghdl.vhdl__nodes_meta__has_prev_block_configuration
-
-Has_Configuration_Item_Chain = libghdl.vhdl__nodes_meta__has_configuration_item_chain
-
-Has_Attribute_Value_Chain = libghdl.vhdl__nodes_meta__has_attribute_value_chain
-
-Has_Spec_Chain = libghdl.vhdl__nodes_meta__has_spec_chain
-
-Has_Value_Chain = libghdl.vhdl__nodes_meta__has_value_chain
-
-Has_Attribute_Value_Spec_Chain = (
- libghdl.vhdl__nodes_meta__has_attribute_value_spec_chain
-)
-
-Has_Entity_Name = libghdl.vhdl__nodes_meta__has_entity_name
-
-Has_Package = libghdl.vhdl__nodes_meta__has_package
-
-Has_Package_Body = libghdl.vhdl__nodes_meta__has_package_body
-
-Has_Instance_Package_Body = libghdl.vhdl__nodes_meta__has_instance_package_body
-
-Has_Need_Body = libghdl.vhdl__nodes_meta__has_need_body
-
-Has_Macro_Expanded_Flag = libghdl.vhdl__nodes_meta__has_macro_expanded_flag
-
-Has_Need_Instance_Bodies = libghdl.vhdl__nodes_meta__has_need_instance_bodies
-
-Has_Hierarchical_Name = libghdl.vhdl__nodes_meta__has_hierarchical_name
-
-Has_Inherit_Spec_Chain = libghdl.vhdl__nodes_meta__has_inherit_spec_chain
-
-Has_Vunit_Item_Chain = libghdl.vhdl__nodes_meta__has_vunit_item_chain
-
-Has_Bound_Vunit_Chain = libghdl.vhdl__nodes_meta__has_bound_vunit_chain
-
-Has_Verification_Block_Configuration = (
- libghdl.vhdl__nodes_meta__has_verification_block_configuration
-)
-
-Has_Block_Configuration = libghdl.vhdl__nodes_meta__has_block_configuration
-
-Has_Concurrent_Statement_Chain = (
- libghdl.vhdl__nodes_meta__has_concurrent_statement_chain
-)
-
-Has_Chain = libghdl.vhdl__nodes_meta__has_chain
-
-Has_Port_Chain = libghdl.vhdl__nodes_meta__has_port_chain
-
-Has_Generic_Chain = libghdl.vhdl__nodes_meta__has_generic_chain
-
-Has_Type = libghdl.vhdl__nodes_meta__has_type
-
-Has_Subtype_Indication = libghdl.vhdl__nodes_meta__has_subtype_indication
-
-Has_Discrete_Range = libghdl.vhdl__nodes_meta__has_discrete_range
-
-Has_Type_Definition = libghdl.vhdl__nodes_meta__has_type_definition
-
-Has_Subtype_Definition = libghdl.vhdl__nodes_meta__has_subtype_definition
-
-Has_Incomplete_Type_Declaration = (
- libghdl.vhdl__nodes_meta__has_incomplete_type_declaration
-)
-
-Has_Interface_Type_Subprograms = (
- libghdl.vhdl__nodes_meta__has_interface_type_subprograms
-)
-
-Has_Nature_Definition = libghdl.vhdl__nodes_meta__has_nature_definition
-
-Has_Nature = libghdl.vhdl__nodes_meta__has_nature
-
-Has_Subnature_Indication = libghdl.vhdl__nodes_meta__has_subnature_indication
-
-Has_Mode = libghdl.vhdl__nodes_meta__has_mode
-
-Has_Guarded_Signal_Flag = libghdl.vhdl__nodes_meta__has_guarded_signal_flag
-
-Has_Signal_Kind = libghdl.vhdl__nodes_meta__has_signal_kind
-
-Has_Base_Name = libghdl.vhdl__nodes_meta__has_base_name
-
-Has_Interface_Declaration_Chain = (
- libghdl.vhdl__nodes_meta__has_interface_declaration_chain
-)
-
-Has_Subprogram_Specification = libghdl.vhdl__nodes_meta__has_subprogram_specification
-
-Has_Sequential_Statement_Chain = (
- libghdl.vhdl__nodes_meta__has_sequential_statement_chain
-)
-
-Has_Simultaneous_Statement_Chain = (
- libghdl.vhdl__nodes_meta__has_simultaneous_statement_chain
-)
-
-Has_Subprogram_Body = libghdl.vhdl__nodes_meta__has_subprogram_body
-
-Has_Overload_Number = libghdl.vhdl__nodes_meta__has_overload_number
-
-Has_Subprogram_Depth = libghdl.vhdl__nodes_meta__has_subprogram_depth
-
-Has_Subprogram_Hash = libghdl.vhdl__nodes_meta__has_subprogram_hash
-
-Has_Impure_Depth = libghdl.vhdl__nodes_meta__has_impure_depth
-
-Has_Return_Type = libghdl.vhdl__nodes_meta__has_return_type
-
-Has_Implicit_Definition = libghdl.vhdl__nodes_meta__has_implicit_definition
-
-Has_Uninstantiated_Subprogram_Name = (
- libghdl.vhdl__nodes_meta__has_uninstantiated_subprogram_name
-)
-
-Has_Default_Value = libghdl.vhdl__nodes_meta__has_default_value
-
-Has_Deferred_Declaration = libghdl.vhdl__nodes_meta__has_deferred_declaration
-
-Has_Deferred_Declaration_Flag = libghdl.vhdl__nodes_meta__has_deferred_declaration_flag
-
-Has_Shared_Flag = libghdl.vhdl__nodes_meta__has_shared_flag
-
-Has_Design_Unit = libghdl.vhdl__nodes_meta__has_design_unit
-
-Has_Block_Statement = libghdl.vhdl__nodes_meta__has_block_statement
-
-Has_Signal_Driver = libghdl.vhdl__nodes_meta__has_signal_driver
-
-Has_Declaration_Chain = libghdl.vhdl__nodes_meta__has_declaration_chain
-
-Has_File_Logical_Name = libghdl.vhdl__nodes_meta__has_file_logical_name
-
-Has_File_Open_Kind = libghdl.vhdl__nodes_meta__has_file_open_kind
-
-Has_Element_Position = libghdl.vhdl__nodes_meta__has_element_position
-
-Has_Use_Clause_Chain = libghdl.vhdl__nodes_meta__has_use_clause_chain
-
-Has_Context_Reference_Chain = libghdl.vhdl__nodes_meta__has_context_reference_chain
-
-Has_Selected_Name = libghdl.vhdl__nodes_meta__has_selected_name
-
-Has_Type_Declarator = libghdl.vhdl__nodes_meta__has_type_declarator
-
-Has_Complete_Type_Definition = libghdl.vhdl__nodes_meta__has_complete_type_definition
-
-Has_Incomplete_Type_Ref_Chain = libghdl.vhdl__nodes_meta__has_incomplete_type_ref_chain
-
-Has_Associated_Type = libghdl.vhdl__nodes_meta__has_associated_type
-
-Has_Enumeration_Literal_List = libghdl.vhdl__nodes_meta__has_enumeration_literal_list
-
-Has_Entity_Class_Entry_Chain = libghdl.vhdl__nodes_meta__has_entity_class_entry_chain
-
-Has_Group_Constituent_List = libghdl.vhdl__nodes_meta__has_group_constituent_list
-
-Has_Unit_Chain = libghdl.vhdl__nodes_meta__has_unit_chain
-
-Has_Primary_Unit = libghdl.vhdl__nodes_meta__has_primary_unit
-
-Has_Identifier = libghdl.vhdl__nodes_meta__has_identifier
-
-Has_Label = libghdl.vhdl__nodes_meta__has_label
-
-Has_Visible_Flag = libghdl.vhdl__nodes_meta__has_visible_flag
-
-Has_Range_Constraint = libghdl.vhdl__nodes_meta__has_range_constraint
-
-Has_Direction = libghdl.vhdl__nodes_meta__has_direction
-
-Has_Left_Limit = libghdl.vhdl__nodes_meta__has_left_limit
-
-Has_Right_Limit = libghdl.vhdl__nodes_meta__has_right_limit
-
-Has_Left_Limit_Expr = libghdl.vhdl__nodes_meta__has_left_limit_expr
-
-Has_Right_Limit_Expr = libghdl.vhdl__nodes_meta__has_right_limit_expr
-
-Has_Parent_Type = libghdl.vhdl__nodes_meta__has_parent_type
-
-Has_Simple_Nature = libghdl.vhdl__nodes_meta__has_simple_nature
-
-Has_Base_Nature = libghdl.vhdl__nodes_meta__has_base_nature
-
-Has_Resolution_Indication = libghdl.vhdl__nodes_meta__has_resolution_indication
-
-Has_Record_Element_Resolution_Chain = (
- libghdl.vhdl__nodes_meta__has_record_element_resolution_chain
-)
-
-Has_Tolerance = libghdl.vhdl__nodes_meta__has_tolerance
-
-Has_Plus_Terminal_Name = libghdl.vhdl__nodes_meta__has_plus_terminal_name
-
-Has_Minus_Terminal_Name = libghdl.vhdl__nodes_meta__has_minus_terminal_name
-
-Has_Plus_Terminal = libghdl.vhdl__nodes_meta__has_plus_terminal
-
-Has_Minus_Terminal = libghdl.vhdl__nodes_meta__has_minus_terminal
-
-Has_Magnitude_Expression = libghdl.vhdl__nodes_meta__has_magnitude_expression
-
-Has_Phase_Expression = libghdl.vhdl__nodes_meta__has_phase_expression
-
-Has_Power_Expression = libghdl.vhdl__nodes_meta__has_power_expression
-
-Has_Simultaneous_Left = libghdl.vhdl__nodes_meta__has_simultaneous_left
-
-Has_Simultaneous_Right = libghdl.vhdl__nodes_meta__has_simultaneous_right
-
-Has_Text_File_Flag = libghdl.vhdl__nodes_meta__has_text_file_flag
-
-Has_Only_Characters_Flag = libghdl.vhdl__nodes_meta__has_only_characters_flag
-
-Has_Is_Character_Type = libghdl.vhdl__nodes_meta__has_is_character_type
-
-Has_Nature_Staticness = libghdl.vhdl__nodes_meta__has_nature_staticness
-
-Has_Type_Staticness = libghdl.vhdl__nodes_meta__has_type_staticness
-
-Has_Constraint_State = libghdl.vhdl__nodes_meta__has_constraint_state
-
-Has_Index_Subtype_List = libghdl.vhdl__nodes_meta__has_index_subtype_list
-
-Has_Index_Subtype_Definition_List = (
- libghdl.vhdl__nodes_meta__has_index_subtype_definition_list
-)
-
-Has_Element_Subtype_Indication = (
- libghdl.vhdl__nodes_meta__has_element_subtype_indication
-)
-
-Has_Element_Subtype = libghdl.vhdl__nodes_meta__has_element_subtype
-
-Has_Element_Subnature_Indication = (
- libghdl.vhdl__nodes_meta__has_element_subnature_indication
-)
-
-Has_Element_Subnature = libghdl.vhdl__nodes_meta__has_element_subnature
-
-Has_Index_Constraint_List = libghdl.vhdl__nodes_meta__has_index_constraint_list
-
-Has_Array_Element_Constraint = libghdl.vhdl__nodes_meta__has_array_element_constraint
-
-Has_Elements_Declaration_List = libghdl.vhdl__nodes_meta__has_elements_declaration_list
-
-Has_Owned_Elements_Chain = libghdl.vhdl__nodes_meta__has_owned_elements_chain
-
-Has_Designated_Type = libghdl.vhdl__nodes_meta__has_designated_type
-
-Has_Designated_Subtype_Indication = (
- libghdl.vhdl__nodes_meta__has_designated_subtype_indication
-)
-
-Has_Index_List = libghdl.vhdl__nodes_meta__has_index_list
-
-Has_Reference = libghdl.vhdl__nodes_meta__has_reference
-
-Has_Nature_Declarator = libghdl.vhdl__nodes_meta__has_nature_declarator
-
-Has_Across_Type_Mark = libghdl.vhdl__nodes_meta__has_across_type_mark
-
-Has_Through_Type_Mark = libghdl.vhdl__nodes_meta__has_through_type_mark
-
-Has_Across_Type_Definition = libghdl.vhdl__nodes_meta__has_across_type_definition
-
-Has_Through_Type_Definition = libghdl.vhdl__nodes_meta__has_through_type_definition
-
-Has_Across_Type = libghdl.vhdl__nodes_meta__has_across_type
-
-Has_Through_Type = libghdl.vhdl__nodes_meta__has_through_type
-
-Has_Target = libghdl.vhdl__nodes_meta__has_target
-
-Has_Waveform_Chain = libghdl.vhdl__nodes_meta__has_waveform_chain
-
-Has_Guard = libghdl.vhdl__nodes_meta__has_guard
-
-Has_Delay_Mechanism = libghdl.vhdl__nodes_meta__has_delay_mechanism
-
-Has_Reject_Time_Expression = libghdl.vhdl__nodes_meta__has_reject_time_expression
-
-Has_Force_Mode = libghdl.vhdl__nodes_meta__has_force_mode
-
-Has_Has_Force_Mode = libghdl.vhdl__nodes_meta__has_has_force_mode
-
-Has_Sensitivity_List = libghdl.vhdl__nodes_meta__has_sensitivity_list
-
-Has_Process_Origin = libghdl.vhdl__nodes_meta__has_process_origin
-
-Has_Package_Origin = libghdl.vhdl__nodes_meta__has_package_origin
-
-Has_Condition_Clause = libghdl.vhdl__nodes_meta__has_condition_clause
-
-Has_Break_Element = libghdl.vhdl__nodes_meta__has_break_element
-
-Has_Selector_Quantity = libghdl.vhdl__nodes_meta__has_selector_quantity
-
-Has_Break_Quantity = libghdl.vhdl__nodes_meta__has_break_quantity
-
-Has_Timeout_Clause = libghdl.vhdl__nodes_meta__has_timeout_clause
-
-Has_Postponed_Flag = libghdl.vhdl__nodes_meta__has_postponed_flag
-
-Has_Callees_List = libghdl.vhdl__nodes_meta__has_callees_list
-
-Has_Passive_Flag = libghdl.vhdl__nodes_meta__has_passive_flag
-
-Has_Resolution_Function_Flag = libghdl.vhdl__nodes_meta__has_resolution_function_flag
-
-Has_Wait_State = libghdl.vhdl__nodes_meta__has_wait_state
-
-Has_All_Sensitized_State = libghdl.vhdl__nodes_meta__has_all_sensitized_state
-
-Has_Seen_Flag = libghdl.vhdl__nodes_meta__has_seen_flag
-
-Has_Pure_Flag = libghdl.vhdl__nodes_meta__has_pure_flag
-
-Has_Foreign_Flag = libghdl.vhdl__nodes_meta__has_foreign_flag
-
-Has_Resolved_Flag = libghdl.vhdl__nodes_meta__has_resolved_flag
-
-Has_Signal_Type_Flag = libghdl.vhdl__nodes_meta__has_signal_type_flag
-
-Has_Has_Signal_Flag = libghdl.vhdl__nodes_meta__has_has_signal_flag
-
-Has_Purity_State = libghdl.vhdl__nodes_meta__has_purity_state
-
-Has_Elab_Flag = libghdl.vhdl__nodes_meta__has_elab_flag
-
-Has_Vendor_Library_Flag = libghdl.vhdl__nodes_meta__has_vendor_library_flag
-
-Has_Configuration_Mark_Flag = libghdl.vhdl__nodes_meta__has_configuration_mark_flag
-
-Has_Configuration_Done_Flag = libghdl.vhdl__nodes_meta__has_configuration_done_flag
-
-Has_Index_Constraint_Flag = libghdl.vhdl__nodes_meta__has_index_constraint_flag
-
-Has_Hide_Implicit_Flag = libghdl.vhdl__nodes_meta__has_hide_implicit_flag
-
-Has_Assertion_Condition = libghdl.vhdl__nodes_meta__has_assertion_condition
-
-Has_Report_Expression = libghdl.vhdl__nodes_meta__has_report_expression
-
-Has_Severity_Expression = libghdl.vhdl__nodes_meta__has_severity_expression
-
-Has_Instantiated_Unit = libghdl.vhdl__nodes_meta__has_instantiated_unit
-
-Has_Generic_Map_Aspect_Chain = libghdl.vhdl__nodes_meta__has_generic_map_aspect_chain
-
-Has_Port_Map_Aspect_Chain = libghdl.vhdl__nodes_meta__has_port_map_aspect_chain
-
-Has_Configuration_Name = libghdl.vhdl__nodes_meta__has_configuration_name
-
-Has_Component_Configuration = libghdl.vhdl__nodes_meta__has_component_configuration
-
-Has_Configuration_Specification = (
- libghdl.vhdl__nodes_meta__has_configuration_specification
-)
-
-Has_Default_Binding_Indication = (
- libghdl.vhdl__nodes_meta__has_default_binding_indication
-)
-
-Has_Default_Configuration_Declaration = (
- libghdl.vhdl__nodes_meta__has_default_configuration_declaration
-)
-
-Has_Expression = libghdl.vhdl__nodes_meta__has_expression
-
-Has_Conditional_Expression_Chain = (
- libghdl.vhdl__nodes_meta__has_conditional_expression_chain
-)
-
-Has_Allocator_Designated_Type = libghdl.vhdl__nodes_meta__has_allocator_designated_type
-
-Has_Selected_Waveform_Chain = libghdl.vhdl__nodes_meta__has_selected_waveform_chain
-
-Has_Conditional_Waveform_Chain = (
- libghdl.vhdl__nodes_meta__has_conditional_waveform_chain
-)
-
-Has_Guard_Expression = libghdl.vhdl__nodes_meta__has_guard_expression
-
-Has_Guard_Decl = libghdl.vhdl__nodes_meta__has_guard_decl
-
-Has_Guard_Sensitivity_List = libghdl.vhdl__nodes_meta__has_guard_sensitivity_list
-
-Has_Signal_Attribute_Chain = libghdl.vhdl__nodes_meta__has_signal_attribute_chain
-
-Has_Block_Block_Configuration = libghdl.vhdl__nodes_meta__has_block_block_configuration
-
-Has_Package_Header = libghdl.vhdl__nodes_meta__has_package_header
-
-Has_Block_Header = libghdl.vhdl__nodes_meta__has_block_header
-
-Has_Uninstantiated_Package_Name = (
- libghdl.vhdl__nodes_meta__has_uninstantiated_package_name
-)
-
-Has_Uninstantiated_Package_Decl = (
- libghdl.vhdl__nodes_meta__has_uninstantiated_package_decl
-)
-
-Has_Instance_Source_File = libghdl.vhdl__nodes_meta__has_instance_source_file
-
-Has_Generate_Block_Configuration = (
- libghdl.vhdl__nodes_meta__has_generate_block_configuration
-)
-
-Has_Generate_Statement_Body = libghdl.vhdl__nodes_meta__has_generate_statement_body
-
-Has_Alternative_Label = libghdl.vhdl__nodes_meta__has_alternative_label
-
-Has_Generate_Else_Clause = libghdl.vhdl__nodes_meta__has_generate_else_clause
-
-Has_Condition = libghdl.vhdl__nodes_meta__has_condition
-
-Has_Else_Clause = libghdl.vhdl__nodes_meta__has_else_clause
-
-Has_Parameter_Specification = libghdl.vhdl__nodes_meta__has_parameter_specification
-
-Has_Parent = libghdl.vhdl__nodes_meta__has_parent
-
-Has_Loop_Label = libghdl.vhdl__nodes_meta__has_loop_label
-
-Has_Exit_Flag = libghdl.vhdl__nodes_meta__has_exit_flag
-
-Has_Next_Flag = libghdl.vhdl__nodes_meta__has_next_flag
-
-Has_Component_Name = libghdl.vhdl__nodes_meta__has_component_name
-
-Has_Instantiation_List = libghdl.vhdl__nodes_meta__has_instantiation_list
-
-Has_Entity_Aspect = libghdl.vhdl__nodes_meta__has_entity_aspect
-
-Has_Default_Entity_Aspect = libghdl.vhdl__nodes_meta__has_default_entity_aspect
-
-Has_Binding_Indication = libghdl.vhdl__nodes_meta__has_binding_indication
-
-Has_Named_Entity = libghdl.vhdl__nodes_meta__has_named_entity
-
-Has_Alias_Declaration = libghdl.vhdl__nodes_meta__has_alias_declaration
-
-Has_Referenced_Name = libghdl.vhdl__nodes_meta__has_referenced_name
-
-Has_Expr_Staticness = libghdl.vhdl__nodes_meta__has_expr_staticness
-
-Has_Scalar_Size = libghdl.vhdl__nodes_meta__has_scalar_size
-
-Has_Error_Origin = libghdl.vhdl__nodes_meta__has_error_origin
-
-Has_Operand = libghdl.vhdl__nodes_meta__has_operand
-
-Has_Left = libghdl.vhdl__nodes_meta__has_left
-
-Has_Right = libghdl.vhdl__nodes_meta__has_right
-
-Has_Unit_Name = libghdl.vhdl__nodes_meta__has_unit_name
-
-Has_Name = libghdl.vhdl__nodes_meta__has_name
-
-Has_Group_Template_Name = libghdl.vhdl__nodes_meta__has_group_template_name
-
-Has_Name_Staticness = libghdl.vhdl__nodes_meta__has_name_staticness
-
-Has_Prefix = libghdl.vhdl__nodes_meta__has_prefix
-
-Has_Signature_Prefix = libghdl.vhdl__nodes_meta__has_signature_prefix
-
-Has_External_Pathname = libghdl.vhdl__nodes_meta__has_external_pathname
-
-Has_Pathname_Suffix = libghdl.vhdl__nodes_meta__has_pathname_suffix
-
-Has_Pathname_Expression = libghdl.vhdl__nodes_meta__has_pathname_expression
-
-Has_In_Formal_Flag = libghdl.vhdl__nodes_meta__has_in_formal_flag
-
-Has_Slice_Subtype = libghdl.vhdl__nodes_meta__has_slice_subtype
-
-Has_Suffix = libghdl.vhdl__nodes_meta__has_suffix
-
-Has_Index_Subtype = libghdl.vhdl__nodes_meta__has_index_subtype
-
-Has_Parameter = libghdl.vhdl__nodes_meta__has_parameter
-
-Has_Parameter_2 = libghdl.vhdl__nodes_meta__has_parameter_2
-
-Has_Parameter_3 = libghdl.vhdl__nodes_meta__has_parameter_3
-
-Has_Parameter_4 = libghdl.vhdl__nodes_meta__has_parameter_4
-
-Has_Attr_Chain = libghdl.vhdl__nodes_meta__has_attr_chain
-
-Has_Signal_Attribute_Declaration = (
- libghdl.vhdl__nodes_meta__has_signal_attribute_declaration
-)
-
-Has_Actual_Type = libghdl.vhdl__nodes_meta__has_actual_type
-
-Has_Actual_Type_Definition = libghdl.vhdl__nodes_meta__has_actual_type_definition
-
-Has_Association_Chain = libghdl.vhdl__nodes_meta__has_association_chain
-
-Has_Individual_Association_Chain = (
- libghdl.vhdl__nodes_meta__has_individual_association_chain
-)
-
-Has_Subprogram_Association_Chain = (
- libghdl.vhdl__nodes_meta__has_subprogram_association_chain
-)
-
-Has_Aggregate_Info = libghdl.vhdl__nodes_meta__has_aggregate_info
-
-Has_Sub_Aggregate_Info = libghdl.vhdl__nodes_meta__has_sub_aggregate_info
-
-Has_Aggr_Dynamic_Flag = libghdl.vhdl__nodes_meta__has_aggr_dynamic_flag
-
-Has_Aggr_Min_Length = libghdl.vhdl__nodes_meta__has_aggr_min_length
-
-Has_Aggr_Low_Limit = libghdl.vhdl__nodes_meta__has_aggr_low_limit
-
-Has_Aggr_High_Limit = libghdl.vhdl__nodes_meta__has_aggr_high_limit
-
-Has_Aggr_Others_Flag = libghdl.vhdl__nodes_meta__has_aggr_others_flag
-
-Has_Aggr_Named_Flag = libghdl.vhdl__nodes_meta__has_aggr_named_flag
-
-Has_Aggregate_Expand_Flag = libghdl.vhdl__nodes_meta__has_aggregate_expand_flag
-
-Has_Association_Choices_Chain = libghdl.vhdl__nodes_meta__has_association_choices_chain
-
-Has_Case_Statement_Alternative_Chain = (
- libghdl.vhdl__nodes_meta__has_case_statement_alternative_chain
-)
-
-Has_Choice_Staticness = libghdl.vhdl__nodes_meta__has_choice_staticness
-
-Has_Procedure_Call = libghdl.vhdl__nodes_meta__has_procedure_call
-
-Has_Implementation = libghdl.vhdl__nodes_meta__has_implementation
-
-Has_Parameter_Association_Chain = (
- libghdl.vhdl__nodes_meta__has_parameter_association_chain
-)
-
-Has_Method_Object = libghdl.vhdl__nodes_meta__has_method_object
-
-Has_Subtype_Type_Mark = libghdl.vhdl__nodes_meta__has_subtype_type_mark
-
-Has_Subnature_Nature_Mark = libghdl.vhdl__nodes_meta__has_subnature_nature_mark
-
-Has_Type_Conversion_Subtype = libghdl.vhdl__nodes_meta__has_type_conversion_subtype
-
-Has_Type_Mark = libghdl.vhdl__nodes_meta__has_type_mark
-
-Has_File_Type_Mark = libghdl.vhdl__nodes_meta__has_file_type_mark
-
-Has_Return_Type_Mark = libghdl.vhdl__nodes_meta__has_return_type_mark
-
-Has_Has_Disconnect_Flag = libghdl.vhdl__nodes_meta__has_has_disconnect_flag
-
-Has_Has_Active_Flag = libghdl.vhdl__nodes_meta__has_has_active_flag
-
-Has_Is_Within_Flag = libghdl.vhdl__nodes_meta__has_is_within_flag
-
-Has_Type_Marks_List = libghdl.vhdl__nodes_meta__has_type_marks_list
-
-Has_Implicit_Alias_Flag = libghdl.vhdl__nodes_meta__has_implicit_alias_flag
-
-Has_Alias_Signature = libghdl.vhdl__nodes_meta__has_alias_signature
-
-Has_Attribute_Signature = libghdl.vhdl__nodes_meta__has_attribute_signature
-
-Has_Overload_List = libghdl.vhdl__nodes_meta__has_overload_list
-
-Has_Simple_Name_Identifier = libghdl.vhdl__nodes_meta__has_simple_name_identifier
-
-Has_Simple_Name_Subtype = libghdl.vhdl__nodes_meta__has_simple_name_subtype
-
-Has_Protected_Type_Body = libghdl.vhdl__nodes_meta__has_protected_type_body
-
-Has_Protected_Type_Declaration = (
- libghdl.vhdl__nodes_meta__has_protected_type_declaration
-)
-
-Has_Use_Flag = libghdl.vhdl__nodes_meta__has_use_flag
-
-Has_End_Has_Reserved_Id = libghdl.vhdl__nodes_meta__has_end_has_reserved_id
-
-Has_End_Has_Identifier = libghdl.vhdl__nodes_meta__has_end_has_identifier
-
-Has_End_Has_Postponed = libghdl.vhdl__nodes_meta__has_end_has_postponed
-
-Has_Has_Label = libghdl.vhdl__nodes_meta__has_has_label
-
-Has_Has_Begin = libghdl.vhdl__nodes_meta__has_has_begin
-
-Has_Has_End = libghdl.vhdl__nodes_meta__has_has_end
-
-Has_Has_Is = libghdl.vhdl__nodes_meta__has_has_is
-
-Has_Has_Pure = libghdl.vhdl__nodes_meta__has_has_pure
-
-Has_Has_Body = libghdl.vhdl__nodes_meta__has_has_body
-
-Has_Has_Parameter = libghdl.vhdl__nodes_meta__has_has_parameter
-
-Has_Has_Component = libghdl.vhdl__nodes_meta__has_has_component
-
-Has_Has_Identifier_List = libghdl.vhdl__nodes_meta__has_has_identifier_list
-
-Has_Has_Mode = libghdl.vhdl__nodes_meta__has_has_mode
-
-Has_Has_Class = libghdl.vhdl__nodes_meta__has_has_class
-
-Has_Has_Delay_Mechanism = libghdl.vhdl__nodes_meta__has_has_delay_mechanism
-
-Has_Suspend_Flag = libghdl.vhdl__nodes_meta__has_suspend_flag
-
-Has_Is_Ref = libghdl.vhdl__nodes_meta__has_is_ref
-
-Has_Is_Forward_Ref = libghdl.vhdl__nodes_meta__has_is_forward_ref
-
-Has_Psl_Property = libghdl.vhdl__nodes_meta__has_psl_property
-
-Has_Psl_Sequence = libghdl.vhdl__nodes_meta__has_psl_sequence
-
-Has_Psl_Declaration = libghdl.vhdl__nodes_meta__has_psl_declaration
-
-Has_Psl_Expression = libghdl.vhdl__nodes_meta__has_psl_expression
-
-Has_Psl_Boolean = libghdl.vhdl__nodes_meta__has_psl_boolean
-
-Has_PSL_Clock = libghdl.vhdl__nodes_meta__has_psl_clock
-
-Has_PSL_NFA = libghdl.vhdl__nodes_meta__has_psl_nfa
-
-Has_PSL_Nbr_States = libghdl.vhdl__nodes_meta__has_psl_nbr_states
-
-Has_PSL_Clock_Sensitivity = libghdl.vhdl__nodes_meta__has_psl_clock_sensitivity
-
-Has_PSL_EOS_Flag = libghdl.vhdl__nodes_meta__has_psl_eos_flag
-
-Has_Count_Expression = libghdl.vhdl__nodes_meta__has_count_expression
-
-Has_Clock_Expression = libghdl.vhdl__nodes_meta__has_clock_expression
-
-Has_Default_Clock = libghdl.vhdl__nodes_meta__has_default_clock
diff --git a/python/setup.py b/python/setup.py
deleted file mode 100644
index 1eec3bcf5..000000000
--- a/python/setup.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-
-from setuptools import setup
-import re
-
-
-def get_version():
- # Try from version.py. Reads it to avoid loading the shared library.
- r = re.compile('^__version__ = "(.*)"\n')
- try:
- l = open("libghdl/version.py").read()
- m = r.match(l)
- if m:
- return m.group(1)
- except:
- pass
- raise Exception("Cannot find version")
-
-
-# Extract the version now, as setup() may change the current directory.
-version = get_version()
-
-setup(
- name="pyghdl",
- version=version,
- description="VHDL Language Server and interface to ghdl, a VHDL analyzer",
- long_description=open("README").read(),
- author="Tristan Gingold",
- author_email="tgingold@free.fr",
- url="http://github.com/ghdl/ghdl",
- license="GPL-2.0-or-later",
- package_dir={"libghdl": "libghdl", "vhdl_langserver": "vhdl_langserver"},
- packages=["libghdl", "libghdl.thin", "libghdl.thin.vhdl", "vhdl_langserver"],
- # List run-time dependencies here. For an analysis of "install_requires"
- # vs pip's requirements files see:
- # https://packaging.python.org/en/latest/requirements.html
- install_requires=["attrs"],
- # To provide executable scripts, use entry points in preference to the
- # "scripts" keyword. Entry points provide cross-platform support and allow
- # pip to create the appropriate form of executable for the target platform.
- entry_points={
- "console_scripts": [
- "ghdl-ls = vhdl_langserver.main:main",
- ]
- },
-)
diff --git a/python/xtools/pnodes.py b/scripts/pnodes.py
index 793c1c712..a5430c879 100755
--- a/python/xtools/pnodes.py
+++ b/scripts/pnodes.py
@@ -73,15 +73,13 @@ class ParseError(Exception):
self.msg = msg
def __str__(self):
- return "Error: " + self.msg
- return (
- "Parse error at " + self.lr.filname + ":" + self.lr.lineno + ": " + self.msg
- )
+ return ("Parse error at {lr.filname}:{lr.lineno}: {msg}".format(lr=self.lr, msg=self.msg))
+
# Return fields description.
# This is a dictionary. The keys represent the possible format of a node.
-# The values are dictionnaries representing fields. Keys are fields name, and
+# The values are dictionaries representing fields. Keys are fields name, and
# values are fields type.
def read_fields(file):
fields = {}
@@ -94,7 +92,7 @@ def read_fields(file):
# Skip '('
if lr.get() != " (\n":
- raise "no open parenthesis after Format_Type"
+ raise Exception("no open parenthesis after Format_Type")
# Read formats
l = lr.get()
@@ -102,8 +100,8 @@ def read_fields(file):
while l != " );\n":
m = pat_field_name.match(l)
if m is None:
- print l
- raise "bad literal within Format_Type"
+ print(l)
+ raise Exception("bad literal within Format_Type")
name = m.group(1)
formats.append(name)
fields[name] = {}
@@ -113,7 +111,6 @@ def read_fields(file):
l = lr.get()
pat_fields = re.compile(" -- Fields of Format_(\w+):\n")
pat_field_desc = re.compile(" -- (\w+) : (\w+).*\n")
- format_name = ""
common_desc = {}
# Read until common fields.
@@ -208,7 +205,7 @@ def read_kinds(filename):
l = lr.get()
mf = pat_first.match(l)
if not mf:
- raise ParseError(lr, "badly formated first bound of subtype")
+ raise ParseError(lr, "badly formatted first bound of subtype")
first = kinds.index(mf.group(1))
idx = first
has_middle = None
@@ -450,7 +447,7 @@ def read_nodes(filename, kinds, kinds_ranges, fields, funcs):
name = m.group(1)
fmt = m.group(2)
names = [(k, fmt) for k in kinds_ranges[name]]
- l = lr.get()
+ lr.get()
read_nodes_fields(lr, names, fields, nodes, funcs_dict)
continue
if pat_comment_line.match(l) or pat_comment_box.match(l):
@@ -467,55 +464,53 @@ def gen_choices(choices):
"""Generate a choice 'when A | B ... Z =>' using elements of CHOICES."""
is_first = True
for c in choices:
+ ch = prefix_name + c
if is_first:
- print " ",
- print "when",
+ is_first = False
+ print(" when " + ch, end='')
else:
- print
- print " ",
- print " |",
- print prefix_name + c,
- is_first = False
- print "=>"
+ print()
+ print(" | " + ch, end='')
+ print(" =>")
def gen_get_format(formats, nodes, kinds):
"""Generate the Get_Format function."""
- print " function Get_Format (Kind : " + type_name + ") " + "return Format_Type is"
- print " begin"
- print " case Kind is"
+ print(" function Get_Format (Kind : " + type_name + ") " + "return Format_Type is")
+ print(" begin")
+ print(" case Kind is")
for f in formats:
choices = [k for k in kinds if nodes[k].format == f]
gen_choices(choices)
- print " return Format_" + f + ";"
- print " end case;"
- print " end Get_Format;"
+ print(" return Format_" + f + ";")
+ print(" end case;")
+ print(" end Get_Format;")
def gen_subprg_header(decl):
if len(decl) < 76:
- print decl + " is"
+ print(decl + " is")
else:
- print decl
- print " is"
- print " begin"
+ print(decl)
+ print(" is")
+ print(" begin")
def gen_assert(func):
- print " pragma Assert (" + func.pname + " /= Null_" + node_type + ");"
+ print(" pragma Assert (" + func.pname + " /= Null_" + node_type + ");")
cond = "(Has_" + func.name + " (Get_Kind (" + func.pname + ")),"
msg = '"no field ' + func.name + '");'
if len(cond) < 60:
- print " pragma Assert " + cond
- print " " + msg
+ print(" pragma Assert " + cond)
+ print(" " + msg)
else:
- print " pragma Assert"
- print " " + cond
- print " " + msg
+ print(" pragma Assert")
+ print(" " + cond)
+ print(" " + msg)
def get_field_type(fields, f):
- for fld in fields.values():
+ for fld in list(fields.values()):
if f in fld:
return fld[f]
return None
@@ -526,13 +521,13 @@ def gen_get_set(func, nodes, fields):
rtype = func.rtype
# If the function needs several fields, it must be user defined
if func.conv == "grp":
- print " type %s_Conv is record" % rtype
+ print(" type %s_Conv is record" % rtype)
for f in func.fields:
- print " %s: %s;" % (f, get_field_type(fields, f))
- print " end record;"
- print " pragma Pack (%s_Conv);" % rtype
- print " pragma Assert (%s_Conv'Size = %s'Size);" % (rtype, rtype)
- print
+ print(" %s: %s;" % (f, get_field_type(fields, f)))
+ print(" end record;")
+ print(" pragma Pack (%s_Conv);" % rtype)
+ print(" pragma Assert (%s_Conv'Size = %s'Size);" % (rtype, rtype))
+ print()
else:
f = func.fields[0]
g = "Get_" + f + " (" + func.pname + ")"
@@ -558,22 +553,22 @@ def gen_get_set(func, nodes, fields):
+ rtype
)
if func.conv == "grp":
- print subprg
- print " is"
- print " function To_%s is new Ada.Unchecked_Conversion" % func.rtype
- print " (%s_Conv, %s);" % (rtype, rtype)
- print " Conv : %s_Conv;" % rtype
- print " begin"
+ print(subprg)
+ print(" is")
+ print(" function To_%s is new Ada.Unchecked_Conversion" % func.rtype)
+ print(" (%s_Conv, %s);" % (rtype, rtype))
+ print(" Conv : %s_Conv;" % rtype)
+ print(" begin")
else:
gen_subprg_header(subprg)
gen_assert(func)
if func.conv == "grp":
for f in func.fields:
- print " Conv.%s := Get_%s (%s);" % (f, f, func.pname)
+ print(" Conv.%s := Get_%s (%s);" % (f, f, func.pname))
g = "To_%s (Conv)" % rtype
- print " return " + g + ";"
- print " end Get_" + func.name + ";"
- print
+ print(" return " + g + ";")
+ print(" end Get_" + func.name + ";")
+ print()
subprg = (
" procedure Set_"
@@ -589,81 +584,81 @@ def gen_get_set(func, nodes, fields):
+ ")"
)
if func.conv == "grp":
- print subprg
- print " is"
- print " function To_%s_Conv is new Ada.Unchecked_Conversion" % func.rtype
- print " (%s, %s_Conv);" % (rtype, rtype)
- print " Conv : %s_Conv;" % rtype
- print " begin"
+ print(subprg)
+ print(" is")
+ print(" function To_%s_Conv is new Ada.Unchecked_Conversion" % func.rtype)
+ print(" (%s, %s_Conv);" % (rtype, rtype))
+ print(" Conv : %s_Conv;" % rtype)
+ print(" begin")
else:
gen_subprg_header(subprg)
gen_assert(func)
if func.conv == "grp":
- print " Conv := To_%s_Conv (%s);" % (rtype, func.rname)
+ print(" Conv := To_%s_Conv (%s);" % (rtype, func.rname))
for f in func.fields:
- print " Set_%s (%s, Conv.%s);" % (f, func.pname, f)
+ print(" Set_%s (%s, Conv.%s);" % (f, func.pname, f))
else:
- print " Set_" + f + " (" + func.pname + ", " + s + ");"
- print " end Set_" + func.name + ";"
- print
+ print(" Set_" + f + " (" + func.pname + ", " + s + ");")
+ print(" end Set_" + func.name + ";")
+ print()
def funcs_of_node(n):
- return sorted([fv.name for fv in n.fields.values() if fv])
+ return sorted([fv.name for fv in list(n.fields.values()) if fv])
def gen_has_func_spec(name, suff):
spec = " function Has_" + name + " (K : " + type_name + ")"
ret = " return Boolean" + suff
if len(spec) < 60:
- print spec + ret
+ print(spec + ret)
else:
- print spec
- print " " + ret
+ print(spec)
+ print(" " + ret)
def do_disp_formats():
for fmt in fields:
- print "Fields of Format_" + fmt
+ print("Fields of Format_" + fmt)
fld = fields[fmt]
for k in fld:
- print " " + k + " (" + fld[k] + ")"
+ print(" " + k + " (" + fld[k] + ")")
def do_disp_kinds():
- print "Kinds are:"
+ print("Kinds are:")
for k in kinds:
- print " " + prefix_name + k
+ print(" " + prefix_name + k)
def do_disp_funcs():
- print "Functions are:"
+ print("Functions are:")
for f in funcs:
- s = "{0} ({1}: {2}".format(f.name, f.field, f.rtype)
+ s = "{0} ({1}: {2}".format(f.name, f.fields, f.rtype)
if f.acc:
s += " acc:" + f.acc
if f.conv:
s += " conv:" + f.conv
s += ")"
- print s
+ print(s)
def do_disp_types():
- print "Types are:"
+ print("Types are:")
s = set([])
for f in funcs:
- s |= set([f.rtype])
+ s |= {f.rtype}
for t in sorted(s):
- print " " + t
+ print(" " + t)
def do_disp_nodes():
for k in kinds:
v = nodes[k]
- print prefix_name + k + " (" + v.format + ")"
- flds = [fk for fk, fv in v.fields.items() if fv]
+ print(prefix_name + k + " (" + v.format + ")")
+ flds = [fk for fk, fv in list(v.fields.items()) if fv]
for fk in sorted(flds):
- print " " + fk + ": " + v.fields[fk].name
+ print(" " + fk + ": " + v.fields[fk].name)
def do_get_format():
@@ -674,10 +669,10 @@ def do_body():
lr = linereader(template_file)
while True:
l = lr.get().rstrip()
- print l
+ print(l)
if l == " -- Subprograms":
gen_get_format(formats, nodes, kinds)
- print
+ print()
for f in funcs:
gen_get_set(f, nodes, fields)
if l[0:3] == "end":
@@ -687,7 +682,7 @@ def do_body():
def get_types():
s = set([])
for f in funcs:
- s |= set([f.rtype])
+ s |= {f.rtype}
return [t for t in sorted(s)]
@@ -695,7 +690,7 @@ def get_attributes():
s = set([])
for f in funcs:
if f.acc:
- s |= set([f.acc])
+ s |= {f.acc}
res = [t for t in sorted(s)]
res.insert(0, "None")
return res
@@ -705,9 +700,9 @@ def gen_enum(prefix, vals):
last = None
for v in vals:
if last:
- print last + ","
+ print(last + ",")
last = prefix + v
- print last
+ print(last)
def do_meta_specs():
@@ -723,18 +718,18 @@ def do_meta_specs():
gen_enum(" Attr_", get_attributes())
elif l == " -- FUNCS":
for t in types:
- print " function Get_" + t
- print " (N : " + node_type + "; F : Fields_Enum) return " + t + ";"
- print " procedure Set_" + t
- print " (N : " + node_type + "; F : Fields_Enum; V: " + t + ");"
- print
+ print(" function Get_" + t)
+ print(" (N : " + node_type + "; F : Fields_Enum) return " + t + ";")
+ print(" procedure Set_" + t)
+ print(" (N : " + node_type + "; F : Fields_Enum; V: " + t + ");")
+ print()
for f in funcs:
gen_has_func_spec(f.name, ";")
elif l[0:3] == "end":
- print l
+ print(l)
break
else:
- print l
+ print(l)
def do_meta_body():
@@ -745,34 +740,34 @@ def do_meta_body():
last = None
for f in funcs:
if last:
- print last + ","
+ print(last + ",")
last = " Field_" + f.name + " => Type_" + f.rtype
- print last
+ print(last)
elif l == " -- FIELD_IMAGE":
for f in funcs:
- print " when Field_" + f.name + " =>"
- print ' return "' + f.name.lower() + '";'
+ print(" when Field_" + f.name + " =>")
+ print(' return "' + f.name.lower() + '";')
elif l == " -- IIR_IMAGE":
for k in kinds:
- print " when " + prefix_name + k + " =>"
- print ' return "' + k.lower() + '";'
+ print(" when " + prefix_name + k + " =>")
+ print(' return "' + k.lower() + '";')
elif l == " -- FIELD_ATTRIBUTE":
for f in funcs:
- print " when Field_" + f.name + " =>"
+ print(" when Field_" + f.name + " =>")
if f.acc:
attr = f.acc
else:
attr = "None"
- print " return Attr_" + attr + ";"
+ print(" return Attr_" + attr + ";")
elif l == " -- FIELDS_ARRAY":
last = None
nodes_types = [node_type, node_type + "_List", node_type + "_Flist"]
for k in kinds:
v = nodes[k]
if last:
- print last + ","
+ print(last + ",")
last = None
- print " -- " + prefix_name + k
+ print(" -- " + prefix_name + k)
# Get list of physical fields for V, in some order.
if flag_keep_order:
flds = v.order
@@ -781,7 +776,7 @@ def do_meta_body():
flds = sorted(
[
fk
- for fk, fv in v.fields.items()
+ for fk, fv in list(v.fields.items())
if fv and fv.rtype not in nodes_types
]
)
@@ -792,7 +787,7 @@ def do_meta_body():
fldsn = []
for fk in flds:
if last:
- print last + ","
+ print(last + ",")
# Remove duplicate
fn = v.fields[fk].name
if fn not in fldsn:
@@ -801,78 +796,78 @@ def do_meta_body():
else:
last = None
if last:
- print last
+ print(last)
elif l == " -- FIELDS_ARRAY_POS":
pos = -1
last = None
for k in kinds:
v = nodes[k]
# Create a set to remove duplicate for 'grp'.
- flds = set([fv.name for fk, fv in v.fields.items() if fv])
+ flds = set([fv.name for fk, fv in list(v.fields.items()) if fv])
pos += len(flds)
if last:
- print last + ","
+ print(last + ",")
last = " " + prefix_name + k + " => {}".format(pos)
- print last
+ print(last)
elif l == " -- FUNCS_BODY":
# Build list of types
s = set([])
for f in funcs:
- s |= set([f.rtype])
+ s |= {f.rtype}
types = [t for t in sorted(s)]
for t in types:
- print " function Get_" + t
- print " (N : " + node_type + "; F : Fields_Enum) return " + t + " is"
- print " begin"
- print " pragma Assert (Fields_Type (F) = Type_" + t + ");"
- print " case F is"
+ print(" function Get_" + t)
+ print(" (N : " + node_type + "; F : Fields_Enum) return " + t + " is")
+ print(" begin")
+ print(" pragma Assert (Fields_Type (F) = Type_" + t + ");")
+ print(" case F is")
for f in funcs:
if f.rtype == t:
- print " when Field_" + f.name + " =>"
- print " return Get_" + f.name + " (N);"
- print " when others =>"
- print " raise Internal_Error;"
- print " end case;"
- print " end Get_" + t + ";"
- print
- print " procedure Set_" + t
- print " (N : " + node_type + "; F : Fields_Enum; V: " + t + ") is"
- print " begin"
- print " pragma Assert (Fields_Type (F) = Type_" + t + ");"
- print " case F is"
+ print(" when Field_" + f.name + " =>")
+ print(" return Get_" + f.name + " (N);")
+ print(" when others =>")
+ print(" raise Internal_Error;")
+ print(" end case;")
+ print(" end Get_" + t + ";")
+ print()
+ print(" procedure Set_" + t)
+ print(" (N : " + node_type + "; F : Fields_Enum; V: " + t + ") is")
+ print(" begin")
+ print(" pragma Assert (Fields_Type (F) = Type_" + t + ");")
+ print(" case F is")
for f in funcs:
if f.rtype == t:
- print " when Field_" + f.name + " =>"
- print " Set_" + f.name + " (N, V);"
- print " when others =>"
- print " raise Internal_Error;"
- print " end case;"
- print " end Set_" + t + ";"
- print
+ print(" when Field_" + f.name + " =>")
+ print(" Set_" + f.name + " (N, V);")
+ print(" when others =>")
+ print(" raise Internal_Error;")
+ print(" end case;")
+ print(" end Set_" + t + ";")
+ print()
for f in funcs:
gen_has_func_spec(f.name, " is")
choices = [k for k in kinds if f.name in nodes[k].attrs]
if len(choices) == 0:
- print " pragma Unreferenced (K);"
- print " begin"
+ print(" pragma Unreferenced (K);")
+ print(" begin")
if len(choices) == 0:
- print " return False;"
+ print(" return False;")
elif len(choices) == 1:
- print " return K = " + prefix_name + choices[0] + ";"
+ print(" return K = " + prefix_name + choices[0] + ";")
else:
- print " case K is"
+ print(" case K is")
gen_choices(choices)
- print " return True;"
- print " when others =>"
- print " return False;"
- print " end case;"
- print " end Has_" + f.name + ";"
- print
+ print(" return True;")
+ print(" when others =>")
+ print(" return False;")
+ print(" end case;")
+ print(" end Has_" + f.name + ";")
+ print()
elif l[0:3] == "end":
- print l
+ print(l)
break
else:
- print l
+ print(l)
actions = {
@@ -890,7 +885,7 @@ actions = {
def main():
parser = argparse.ArgumentParser(description="Meta-grammar processor")
- parser.add_argument("action", choices=actions.keys(), default="disp-nodes")
+ parser.add_argument("action", choices=list(actions.keys()), default="disp-nodes")
parser.add_argument(
"--field-file",
dest="field_file",
@@ -973,13 +968,13 @@ def main():
nodes = read_nodes(node_file, kinds, kinds_ranges, fields, funcs)
except ParseError as e:
- print >> sys.stderr, e
- print >> sys.stderr, "in {0}:{1}:{2}".format(e.lr.filename, e.lr.lineno, e.lr.l)
+ print(e, file=sys.stderr)
+ print("in {0}:{1}:{2}".format(e.lr.filename, e.lr.lineno, e.lr.l), file=sys.stderr)
sys.exit(1)
f = actions.get(args.action, None)
if not f:
- print >> sys.stderr, "Action {0} is unknown".format(args.action)
+ print("Action {0} is unknown".format(args.action), file=sys.stderr)
sys.exit(1)
f()
diff --git a/python/xtools/pnodespy.py b/scripts/pnodespy.py
index 0e0f5ba9e..962ffa988 100755
--- a/python/xtools/pnodespy.py
+++ b/scripts/pnodespy.py
@@ -3,6 +3,9 @@
"""Like pnodes but output for python"""
from __future__ import print_function
+
+import sys
+
import pnodes
import re
@@ -213,7 +216,7 @@ def do_libghdl_names():
if m:
name_def = m.group(1)
name_ref = m.group(2)
- val = m.group(3)
+ val = m.group(4)
if not val:
val = 0
val_ref = dict.get(name_ref, None)
diff --git a/setup.py b/setup.py
new file mode 100644
index 000000000..47f41fbc6
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,122 @@
+# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
+# vim: tabstop=2:shiftwidth=2:noexpandtab
+# kate: tab-width 2; replace-tabs off; indent-width 2;
+# =============================================================================
+# ____ _ _ ____ _
+# _ __ _ _ / ___| | | | _ \| |
+# | '_ \| | | | | _| |_| | | | | |
+# | |_) | |_| | |_| | _ | |_| | |___
+# | .__/ \__, |\____|_| |_|____/|_____|
+# |_| |___/
+# =============================================================================
+# Authors: Tristan Gingold
+# Patrick Lehmann
+#
+# Package installer: 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
+# ============================================================================
+#
+from pathlib import Path
+from re import compile as re_compile
+from setuptools import setup as setuptools_setup, find_packages as setuptools_find_packages
+
+gitHubNamespace = "ghdl"
+projectName = "ghdl"
+packageName = "pyGHDL"
+packagePath = Path(packageName)
+
+# Read (local) README for upload to PyPI
+readmeFile = packagePath / "README.md"
+with readmeFile.open("r") as file:
+ long_description = file.read()
+
+# Read requirements file and add them to package dependency list
+requirementsFile = packagePath / "requirements.txt"
+with requirementsFile.open("r") as file:
+ requirements = [line for line in file.readlines()]
+
+def get_version():
+ # Try from version.py. Reads it to avoid loading the shared library.
+ pattern = re_compile('^__version__ = "(.*)"\n')
+ try:
+ line = open("pyGHDL/libghdl/version.py").read()
+ match = pattern.match(line)
+ if match:
+ return match.group(1)
+ except:
+ pass
+
+ raise Exception("Cannot find version")
+
+# Derive URLs
+sourceCodeURL = "https://github.com/{namespace}/{projectName}".format(namespace=gitHubNamespace, projectName=projectName)
+documentationURL = "https://{namespace}.github.io/{projectName}/using/py/index.html".format(namespace=gitHubNamespace, projectName=projectName)
+
+# Assemble all package information
+setuptools_setup(
+ name=packageName,
+ version=get_version(),
+
+ author="Tristan Gingold",
+ author_email="tgingold@free.fr",
+ license="GPL-2.0-or-later",
+ description="Python binding for GHDL and high-level APIs (incl. LSP).",
+ long_description=long_description,
+ long_description_content_type="text/markdown",
+
+ url=sourceCodeURL,
+ project_urls={
+ 'Documentation': documentationURL,
+ 'Source Code': sourceCodeURL,
+ 'Issue Tracker': sourceCodeURL + "/issues"
+ },
+
+ python_requires='>=3.7',
+ install_requires=requirements,
+ packages=setuptools_find_packages(exclude=("tests",)),
+ entry_points={
+ 'console_scripts': [
+ "ghdl-ls = pyGHDL.cli.lsp:main"
+ ]
+ },
+
+ keywords="Python3 VHDL Parser Compiler Simulator GHDL",
+ classifiers=[
+ "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
+ "Operating System :: MacOS",
+ "Operating System :: Microsoft :: Windows :: Windows 10",
+ "Operating System :: POSIX :: Linux",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Development Status :: 4 - Beta",
+# "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
+ "Topic :: Software Development :: Code Generators",
+ "Topic :: Software Development :: Compilers",
+ "Topic :: Software Development :: Testing",
+ "Topic :: Utilities",
+ ]
+)
diff --git a/src/edif/Makefile b/src/edif/Makefile
index 3a3cb4a8b..e7e449483 100644
--- a/src/edif/Makefile
+++ b/src/edif/Makefile
@@ -6,8 +6,16 @@ ortho_srcdir=../ortho
GEN_SRCS=edif-nodes.adb edif-nodes_meta.ads edif-nodes_meta.adb
CC=gcc
-PNODES=../../python/xtools/pnodes.py
-PNODES_ARGS=--field-file=edif-nodes.adb.in --kind-file=edif-nodes.ads --node-file=edif-nodes.ads --template-file=edif-nodes.adb.in --meta-basename=edif-nodes_meta --kind-type=Nkind --kind-range-prefix=Nkinds_ --kind-prefix=N_ --node-type=Node
+PNODES=../../scripts/pnodes.py
+PNODES_ARGS=--field-file=edif-nodes.adb.in \
+ --kind-file=edif-nodes.ads \
+ --node-file=edif-nodes.ads \
+ --template-file=edif-nodes.adb.in \
+ --meta-basename=edif-nodes_meta \
+ --kind-type=Nkind \
+ --kind-range-prefix=Nkinds_ \
+ --kind-prefix=N_ \
+ --node-type=Node
all: dump_edif
diff --git a/src/psl/Makefile b/src/psl/Makefile
index fdcfccaf7..9d7627263 100644
--- a/src/psl/Makefile
+++ b/src/psl/Makefile
@@ -20,11 +20,18 @@
# be committed and distribued with the sources, so that users don't need to
# regenerate them (and don't need to have python installed).
-PNODES=../../python/xtools/pnodes.py
+PNODES=../../scripts/pnodes.py
DEPS=psl-nodes.ads psl-nodes.adb.in $(PNODES)
-PNODES_FLAGS=--field-file=psl-nodes.adb.in --kind-file=psl-nodes.ads --node-file=psl-nodes.ads --template-file=psl-nodes.adb.in --meta-basename=psl-nodes_meta --kind-type=Nkind --kind-prefix=N_ --node-type=Node
+PNODES_FLAGS=--field-file=psl-nodes.adb.in \
+ --kind-file=psl-nodes.ads \
+ --node-file=psl-nodes.ads \
+ --template-file=psl-nodes.adb.in \
+ --meta-basename=psl-nodes_meta \
+ --kind-type=Nkind \
+ --kind-prefix=N_ \
+ --node-type=Node
GEN_FILES=psl-nodes.adb psl-nodes_meta.ads psl-nodes_meta.adb
diff --git a/src/vhdl/Makefile b/src/vhdl/Makefile
index 754f063dd..08277b4d5 100644
--- a/src/vhdl/Makefile
+++ b/src/vhdl/Makefile
@@ -20,18 +20,23 @@
# be committed and distribued with the sources, so that users don't need to
# regenerate them (and don't need to have python installed).
-PNODES=../../python/xtools/pnodes.py
-PNODESPY=../../python/xtools/pnodespy.py
+PNODES=../../scripts/pnodes.py
+PNODESPY=../../scripts/pnodespy.py
DEPS=vhdl-nodes.ads vhdl-nodes.adb.in $(PNODES)
-GEN_FILES=vhdl-nodes.adb vhdl-nodes_meta.ads vhdl-nodes_meta.adb \
- vhdl-elocations.adb vhdl-elocations_meta.ads vhdl-elocations_meta.adb \
- ../../python/libghdl/thin/vhdl/nodes.py \
- ../../python/libghdl/thin/vhdl/nodes_meta.py \
- ../../python/libghdl/thin/vhdl/tokens.py \
- ../../python/libghdl/thin/vhdl/elocations.py \
- ../../python/libghdl/thin/errorout.py ../../python/libghdl/thin/std_names.py
+GEN_FILES=vhdl-nodes.adb \
+ vhdl-nodes_meta.ads \
+ vhdl-nodes_meta.adb \
+ vhdl-elocations.adb \
+ vhdl-elocations_meta.ads \
+ vhdl-elocations_meta.adb \
+ ../../pyGHDL/libghdl/vhdl/nodes.py \
+ ../../pyGHDL/libghdl/vhdl/nodes_meta.py \
+ ../../pyGHDL/libghdl/vhdl/tokens.py \
+ ../../pyGHDL/libghdl/vhdl/elocations.py \
+ ../../pyGHDL/libghdl/errorout.py \
+ ../../pyGHDL/libghdl/std_names.py
NODES_FLAGS=--node-file=vhdl-nodes.ads --field-file=vhdl-nodes.adb.in \
--template-file=vhdl-nodes.adb.in --kind-file=vhdl-nodes.ads \
@@ -73,32 +78,32 @@ vhdl-elocations_meta.adb: vhdl-elocations_meta.adb.in vhdl-elocations.ads $(DEPS
$(PNODES) $(ELOCATIONS_FLAGS) meta_body > $@
chmod -w $@
-../../python/libghdl/thin/vhdl/nodes.py: $(DEPS) $(PNODESPY)
+../../pyGHDL/libghdl/vhdl/nodes.py: $(DEPS) $(PNODESPY)
$(RM) $@
$(PNODESPY) $(NODES_FLAGS) libghdl-nodes > $@
chmod -w $@
-../../python/libghdl/thin/vhdl/nodes_meta.py: $(DEPS) $(PNODESPY)
+../../pyGHDL/libghdl/vhdl/nodes_meta.py: $(DEPS) $(PNODESPY)
$(RM) $@
$(PNODESPY) $(NODES_FLAGS) libghdl-meta > $@
chmod -w $@
-../../python/libghdl/thin/std_names.py: $(PNODESPY) ../std_names.ads
+../../pyGHDL/libghdl/std_names.py: $(PNODESPY) ../std_names.ads
$(RM) $@
$(PNODESPY) $(NODES_FLAGS) libghdl-names > $@
chmod -w $@
-../../python/libghdl/thin/vhdl/tokens.py: $(PNODESPY) vhdl-tokens.ads
+../../pyGHDL/libghdl/vhdl/tokens.py: $(PNODESPY) vhdl-tokens.ads
$(RM) $@
$(PNODESPY) $(NODES_FLAGS) libghdl-tokens > $@
chmod -w $@
-../../python/libghdl/thin/vhdl/elocations.py: $(PNODESPY) vhdl-elocations.ads
+../../pyGHDL/libghdl/vhdl/elocations.py: $(PNODESPY) vhdl-elocations.ads
$(RM) $@
$(PNODESPY) $(ELOCATIONS_FLAGS) libghdl-elocs > $@
chmod -w $@
-../../python/libghdl/thin/errorout.py: $(PNODESPY) ../errorout.ads
+../../pyGHDL/libghdl/errorout.py: $(PNODESPY) ../errorout.ads
$(RM) $@
$(PNODESPY) $(ELOCATIONS_FLAGS) libghdl-errorout > $@
chmod -w $@
diff --git a/testsuite/python/testsuite.sh b/testsuite/python/testsuite.sh
deleted file mode 100755
index 12b367f2c..000000000
--- a/testsuite/python/testsuite.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-
-# Driver for a testsuite.
-
-set -e
-
-# This is the only place where test dirs are specified. Do not duplicate this
-# line
-dirs="*[0-9]"
-
-failures=""
-full=n
-
-for opt; do
- case "$opt" in
- -k | --keep-going) full=y ;;
- --dir=*) dirs=`echo $opt | sed -e 's/--dir=//'` ;;
- --skip=*) d=`echo $opt | sed -e 's/--skip=//'`
- dirs=`echo "" $dirs | sed -e "s/ $d//"` ;;
- --start-at=*) d=`echo $opt | sed -e 's/--start-at=//'`
- dirs=`echo "" $dirs | sed -e "s/^.* $d//"`
- dirs="$d $dirs" ;;
- --list-tests) echo $dirs; exit 0;;
- *) echo "Unknown option $opt"
- exit 2
- ;;
- esac
-done
-
-singlerun() {
- echo ""
- echo "dir $1:"
- cd $1
- if ! ./testsuite.sh; then
- echo "#################################################################"
- echo "######### FAILURE: $1"
- echo "#################################################################"
- if [ $2 = "y" ]; then
- failures="$failures $1"
- else
- exit 1;
- fi
- fi
- cd ..
-}
-
-for i in $dirs; do singlerun $i $full; done
-
-if [ x"$failures" = x"" ]; then
- echo "tests are successful" && exit 0
-else
- echo "test failed ($failures)" && exit 1
-fi
diff --git a/testsuite/python/units01/demo.vhdl b/testsuite/python/units01/demo.vhdl
deleted file mode 100644
index ed98c936a..000000000
--- a/testsuite/python/units01/demo.vhdl
+++ /dev/null
@@ -1,12 +0,0 @@
-entity e1 is
-port (
- CLK: in std_logic;
- RST: in std_logic;
- Q: out std_logic_vector(7 downto 0)
-);
-end e1;
-
-architecture behav of e1 is
-begin
- assert false report "arch" severity note;
-end behav;
diff --git a/testsuite/python/units01/show_ports.py b/testsuite/python/units01/show_ports.py
deleted file mode 100644
index a11f2acbd..000000000
--- a/testsuite/python/units01/show_ports.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env python
-from sys import argv
-from pathlib import Path
-
-import libghdl
-from libghdl.thin import name_table
-from libghdl.thin import files_map
-from libghdl.thin.vhdl import nodes
-from libghdl.thin.vhdl import sem_lib
-from libghdl.thin.vhdl import pyutils
-from libghdl.thin import errorout_console
-
-
-def get_identifier_ptr(n):
- """Return the python string from node :param n: identifier"""
- return name_table.Get_Name_Ptr(nodes.Get_Identifier(n)).decode("utf-8")
-
-
-def get_port_mode(port) -> str:
- """Return the Mode of a port, as a string"""
- mode = nodes.Get_Mode(port)
- return (
- "in"
- if mode == nodes.Iir_Mode.In_Mode
- else "out"
- if mode == nodes.Iir_Mode.Out_Mode
- else "inout"
- if mode == nodes.Iir_Mode.Inout_Mode
- else "buffer"
- if mode == nodes.Iir_Mode.Buffer_Mode
- else "linkage"
- if mode == nodes.Iir_Mode.Linkage_Mode
- else "unknown"
- )
-
-
-def get_port_type(port) -> str:
- "Return the Type of a port, as a string"
- subtype = nodes.Get_Subtype_Indication(port)
- skind = nodes.Get_Kind(subtype)
-
- if skind == nodes.Iir_Kind.Simple_Name:
- return get_identifier_ptr(subtype)
-
- if skind == nodes.Iir_Kind.Array_Subtype_Definition:
- mark = get_identifier_ptr(nodes.Get_Subtype_Type_Mark(subtype))
-
- for rng in pyutils.flist_iter(nodes.Get_Index_Constraint_List(subtype)):
- if nodes.Get_Kind(rng) == nodes.Iir_Kind.Range_Expression:
- return "%s(%d %s %d)" % (
- mark,
- nodes.Get_Value(nodes.Get_Left_Limit_Expr(rng)),
- "downto" if nodes.Get_Direction(rng) else "to",
- nodes.Get_Value(nodes.Get_Right_Limit_Expr(rng)),
- )
- return "UNSUPPORTED array_subtype_definition"
-
- return "UNSUPPORTED"
-
-
-def list_units(filename):
- # Load the file
- file_id = name_table.Get_Identifier(filename.encode("utf_8"))
- sfe = files_map.Read_Source_File(name_table.Null_Identifier, file_id)
- if sfe == files_map.No_Source_File_Entry:
- print("cannot open file '%s'" % filename)
- return
-
- # Parse
- file = sem_lib.Load_File(sfe)
-
- # Display all design units
- unit = nodes.Get_First_Design_Unit(file)
- while unit != nodes.Null_Iir:
- lib_unit = nodes.Get_Library_Unit(unit)
- if nodes.Get_Kind(lib_unit) == nodes.Iir_Kind.Entity_Declaration:
- print(" - entity %s" % get_identifier_ptr(lib_unit))
- for port in pyutils.chain_iter(nodes.Get_Port_Chain(lib_unit)):
- print(
- " * %s %s %s"
- % (
- get_identifier_ptr(port),
- get_port_mode(port),
- get_port_type(port),
- )
- )
- elif nodes.Get_Kind(lib_unit) == nodes.Iir_Kind.Architecture_Body:
- print(
- " - architecture %s of %s"
- % (
- get_identifier_ptr(lib_unit),
- get_identifier_ptr(nodes.Get_Entity_Name(lib_unit)),
- )
- )
- else:
- print("unknown unit!")
- unit = nodes.Get_Chain(unit)
-
-
-if __name__ == "__main__":
- # Initialization: set options and then load libaries
- errorout_console.Install_Handler()
- libghdl.set_option(b"--std=08")
- if libghdl.analyze_init_status() != 0:
- raise Exception("libghdl initialization error")
-
- # Recursively find and parse all the files with extension *.vhdl
- if len(argv) > 1:
- for file in Path(argv[1]).glob("**/*.vhdl"):
- print("· %s" % file)
- list_units(str(file))
diff --git a/testsuite/python/units01/show_units.py b/testsuite/python/units01/show_units.py
deleted file mode 100755
index 43baf9aed..000000000
--- a/testsuite/python/units01/show_units.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python
-import libghdl
-from libghdl.thin import name_table
-from libghdl.thin import files_map
-from libghdl.thin.vhdl import nodes
-from libghdl.thin.vhdl import sem_lib
-from libghdl.thin import errorout_console
-
-
-def init():
- """Initialization: set options and then load libaries"""
- # Print error messages on the console
- errorout_console.Install_Handler()
- # Set options. This must be done before analyze_init()
- libghdl.set_option(b"--std=08")
- # Finish initialization. This will load the standard package
- if libghdl.analyze_init_status() != 0:
- raise Exception("libghdl initialization error")
-
-def get_identifier_ptr(n):
- """Return the python string from node :param n: identifier"""
- return name_table.Get_Name_Ptr(nodes.Get_Identifier(n)).decode("utf-8")
-
-
-def list_units(filename):
- # Load the file
- file_id = name_table.Get_Identifier(filename.encode("utf_8"))
- sfe = files_map.Read_Source_File(name_table.Null_Identifier, file_id)
- if sfe == files_map.No_Source_File_Entry:
- print("cannot open file '%s'" % filename)
- return
-
- # Parse
- file = sem_lib.Load_File(sfe)
-
- # Display all design units
- unit = nodes.Get_First_Design_Unit(file)
- while unit != nodes.Null_Iir:
- lib_unit = nodes.Get_Library_Unit(unit)
- if nodes.Get_Kind(lib_unit) == nodes.Iir_Kind.Entity_Declaration:
- print("entity %s" % get_identifier_ptr(lib_unit))
- elif nodes.Get_Kind(lib_unit) == nodes.Iir_Kind.Architecture_Body:
- print("architecture %s" % get_identifier_ptr(lib_unit))
- else:
- print("unknown unit!")
- unit = nodes.Get_Chain(unit)
-
-
-def main():
- init()
- list_units("demo.vhdl")
-
-
-if __name__ == "__main__":
- main()
diff --git a/testsuite/python/units01/testsuite.sh b/testsuite/python/units01/testsuite.sh
deleted file mode 100755
index f45d12ac3..000000000
--- a/testsuite/python/units01/testsuite.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-. ../../testenv.sh
-
-$PYTHON show_units.py
-
-echo ""
-
-$PYTHON show_ports.py ./
-
-echo "Test successful"
diff --git a/testsuite/pyunit/SimpleEntity.vhdl b/testsuite/pyunit/SimpleEntity.vhdl
new file mode 100644
index 000000000..a26a6357c
--- /dev/null
+++ b/testsuite/pyunit/SimpleEntity.vhdl
@@ -0,0 +1,27 @@
+library ieee;
+use ieee.numeric_std.all;
+
+entity e1 is
+ generic (
+ BITS : positive := 8
+ );
+ port (
+ Clock: in std_logic;
+ Reset: in std_logic;
+ Q: out std_logic_vector(BITS - 1 downto 0)
+ );
+end entity e1;
+
+architecture behav of e1 is
+begin
+ process(Clock)
+ begin
+ if rising_edge(Clock) then
+ if Reset = '1' then
+ Q <= (others => '0');
+ else
+ Q <= std_logic_vector(unsigned(Q) + 1);
+ end if;
+ end if;
+ end process;
+end architecture behav;
diff --git a/testsuite/pyunit/SimplePackage.vhdl b/testsuite/pyunit/SimplePackage.vhdl
new file mode 100644
index 000000000..f06cc32fa
--- /dev/null
+++ b/testsuite/pyunit/SimplePackage.vhdl
@@ -0,0 +1,21 @@
+library ieee;
+use ieee.numeric_std.all
+
+package pack_1 is
+ constant const_1 : boolean;
+
+ type matrix is array(natural range <>, natural range <>) of std_logic;
+
+ subtype matrix8x8 is matrix(7 downto 0, 7 downto 0);
+
+ function func1(value : unsigned) return natural;
+end package;
+
+package body pack_1 is
+ constant const_1 : boolean := true;
+
+ function func1(value : unsigned) return natural is
+ begin
+ return to_integer(value);
+ end function;
+end package body;
diff --git a/testsuite/pyunit/__init__.py b/testsuite/pyunit/__init__.py
new file mode 100644
index 000000000..eff53eb2f
--- /dev/null
+++ b/testsuite/pyunit/__init__.py
@@ -0,0 +1,14 @@
+from unittest import TestSuite
+
+try:
+ from testsuite.pyunit import libghdl, dom
+except ModuleNotFoundError:
+ from pyunit import libghdl, dom
+
+def load_tests(loader, testCases, pattern):
+ suite = TestSuite()
+
+ suite.addTests(loader.loadTestsFromModule(libghdl))
+ suite.addTests(loader.loadTestsFromModule(dom))
+
+ return suite
diff --git a/testsuite/pyunit/dom/SimpleEntity.py b/testsuite/pyunit/dom/SimpleEntity.py
new file mode 100644
index 000000000..2f65c9813
--- /dev/null
+++ b/testsuite/pyunit/dom/SimpleEntity.py
@@ -0,0 +1,46 @@
+from pathlib import Path
+from unittest import TestCase
+
+from pyGHDL.dom.Misc import Design, Library, Document
+
+
+if __name__ == "__main__":
+ print("ERROR: you called a testcase declaration file as an executable module.")
+ print("Use: 'python -m unitest <testcase module>'")
+ exit(1)
+
+
+class SimpleEntity(TestCase):
+ _root = Path(__file__).resolve().parent.parent
+ _filename : Path = _root / "SimpleEntity.vhdl"
+
+ def test_Design(self):
+ design = Design()
+
+ self.assertIsNotNone(design)
+
+ # def test_Library(self):
+ # library = Library()
+
+ def test_Document(self):
+ design = Design()
+ document = Document(self._filename)
+ design.Documents.append(document)
+
+ self.assertTrue(len(design.Documents) == 1)
+
+ def test_Entity(self):
+ design = Design()
+ document = Document(self._filename)
+ design.Documents.append(document)
+
+ self.assertEqual(len(design.Documents[0].Entities), 1)
+ self.assertTrue(design.Documents[0].Entities[0].Name == "e1")
+
+ def test_Architecture(self):
+ design = Design()
+ document = Document(self._filename)
+ design.Documents.append(document)
+
+ self.assertEqual(len(design.Documents[0].Architectures), 1)
+ self.assertTrue(design.Documents[0].Architectures[0].Name == "behav")
diff --git a/testsuite/pyunit/dom/__init__.py b/testsuite/pyunit/dom/__init__.py
new file mode 100644
index 000000000..9c103eb6a
--- /dev/null
+++ b/testsuite/pyunit/dom/__init__.py
@@ -0,0 +1,13 @@
+from unittest import TestSuite
+
+try:
+ from testsuite.pyunit.dom import SimpleEntity
+except ModuleNotFoundError:
+ from pyunit.dom import SimpleEntity
+
+def load_tests(loader, testCases, pattern):
+ suite = TestSuite()
+
+ suite.addTests(loader.loadTestsFromModule(SimpleEntity))
+
+ return suite
diff --git a/testsuite/pyunit/libghdl/Initialize.py b/testsuite/pyunit/libghdl/Initialize.py
new file mode 100644
index 000000000..0a46fe8b4
--- /dev/null
+++ b/testsuite/pyunit/libghdl/Initialize.py
@@ -0,0 +1,62 @@
+from pathlib import Path
+from unittest import TestCase
+
+import pyGHDL.libghdl as libghdl
+from pyGHDL.libghdl import name_table, files_map, errorout_console
+from pyGHDL.libghdl.vhdl import nodes, sem_lib
+
+
+if __name__ == "__main__":
+ print("ERROR: you called a testcase declaration file as an executable module.")
+ print("Use: 'python -m unitest <testcase module>'")
+ exit(1)
+
+
+class Instantiate(TestCase):
+ _root = Path(__file__).resolve().parent.parent
+ _filename : Path = _root / "SimpleEntity.vhdl"
+
+ @staticmethod
+ def getIdentifier(node):
+ """Return the Python string from node :param:`node` identifier"""
+ return name_table.Get_Name_Ptr(nodes.Get_Identifier(node)).decode("utf-8")
+
+ def test_InitializeGHDL(self) -> None:
+ """Initialization: set options and then load libaries"""
+
+ # Print error messages on the console.
+ errorout_console.Install_Handler()
+
+ # Set options. This must be done before analyze_init()
+ libghdl.set_option(b"--std=08")
+
+ # Finish initialization. This will load the standard package.
+ if libghdl.analyze_init_status() != 0:
+ self.fail("libghdl initialization error")
+
+ # Load the file
+ file_id = name_table.Get_Identifier(str(self._filename).encode("utf_8"))
+ sfe = files_map.Read_Source_File(name_table.Null_Identifier, file_id)
+ if sfe == files_map.No_Source_File_Entry:
+ self.fail("Cannot read file '{!s}'".format(self._filename))
+
+ # Parse
+ file = sem_lib.Load_File(sfe)
+
+ # Display all design units
+ designUnit = nodes.Get_First_Design_Unit(file)
+ while designUnit != nodes.Null_Iir:
+ libraryUnit = nodes.Get_Library_Unit(designUnit)
+
+ if nodes.Get_Kind(libraryUnit) == nodes.Iir_Kind.Entity_Declaration:
+ entityName = self.getIdentifier(libraryUnit)
+ self.assertEqual(entityName, "e1", "expected entity name 'e1', got '{}'".format(entityName))
+
+ elif nodes.Get_Kind(libraryUnit) == nodes.Iir_Kind.Architecture_Body:
+ architectureName = self.getIdentifier(libraryUnit)
+ self.assertEqual(architectureName, "behav", "expected architecture name 'behav', got '{}'".format(architectureName))
+
+ else:
+ self.fail("Unknown unit.")
+
+ designUnit = nodes.Get_Chain(designUnit)
diff --git a/testsuite/pyunit/libghdl/__init__.py b/testsuite/pyunit/libghdl/__init__.py
new file mode 100644
index 000000000..4aeab3ec3
--- /dev/null
+++ b/testsuite/pyunit/libghdl/__init__.py
@@ -0,0 +1,13 @@
+from unittest import TestSuite
+
+try:
+ from testsuite.pyunit.libghdl import Initialize
+except ModuleNotFoundError:
+ from pyunit.libghdl import Initialize
+
+def load_tests(loader, testCases, pattern):
+ suite = TestSuite()
+
+ suite.addTests(loader.loadTestsFromModule(Initialize))
+
+ return suite
diff --git a/testsuite/requirements.txt b/testsuite/requirements.txt
new file mode 100644
index 000000000..ce54b669b
--- /dev/null
+++ b/testsuite/requirements.txt
@@ -0,0 +1,4 @@
+-r ../pyGHDL/requirements.txt
+
+# Coverage collection
+Coverage>=5.3
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh
index fd686ccd0..55c2ff9fb 100755
--- a/testsuite/testsuite.sh
+++ b/testsuite/testsuite.sh
@@ -112,7 +112,7 @@ do_sanity () {
[ "$failures" = "" ] || exit 1
}
-# The GNA testsuite: regression testsuite using reports/issues from gna.org
+# The GNA testsuite: regression testsuite using reports/issues from gna.org and from GitHub
do_gna () {
gstart "[GHDL - test] gna"
cd gna
@@ -138,6 +138,15 @@ do_gna () {
[ "$failures" = "" ] || exit 1
}
+# The Python Unit testsuite: regression testsuite for Python bindings to libghdl
+do_pyunit () {
+ gstart "[GHDL - test] pyunit"
+ cd ..
+ PYTHONPATH=$(pwd) python3 -m unittest testsuite.pyunit.libghdl.Initialize
+ cd testsuite
+ gend
+}
+
# The VESTS testsuite: compliance testsuite, from: https://github.com/nickg/vests.git 388250486a
do_vests () {
gstart "[GHDL - test] vests"
@@ -226,7 +235,7 @@ for opt; do
esac
done
-if [ "x$tests" = "x" ]; then tests="sanity gna vests synth vpi"; fi
+if [ "x$tests" = "x" ]; then tests="sanity pyunit gna vests synth vpi"; fi
echo "tests: $tests"
@@ -234,10 +243,11 @@ echo "tests: $tests"
do_test() {
case $1 in
sanity) do_sanity;;
+ pyunit) do_pyunit;;
gna) do_gna;;
vests) do_vests;;
synth) do_synth;;
- vpi) do_vpi;;
+ vpi) do_vpi;;
*)
printf "${ANSI_RED}$0: test name '$1' is unknown${ANSI_NOCOLOR}\n"
exit 1;;