aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/libghdl/vhdl/sem_lib.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-01-07 16:03:52 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-10 10:14:16 +0100
commit2a13ab3ff6e86782018fd1691ceb3e6ad92bef96 (patch)
treef3fd979b7e769c4b01273e6d7b72ced5489934d9 /pyGHDL/libghdl/vhdl/sem_lib.py
parent886c4a2edb17a08901b3c488d11b9a9f77d16a7a (diff)
downloadghdl-2a13ab3ff6e86782018fd1691ceb3e6ad92bef96.tar.gz
ghdl-2a13ab3ff6e86782018fd1691ceb3e6ad92bef96.tar.bz2
ghdl-2a13ab3ff6e86782018fd1691ceb3e6ad92bef96.zip
Enhanced docstrings for Python/Ada interface.
Diffstat (limited to 'pyGHDL/libghdl/vhdl/sem_lib.py')
-rw-r--r--pyGHDL/libghdl/vhdl/sem_lib.py39
1 files changed, 34 insertions, 5 deletions
diff --git a/pyGHDL/libghdl/vhdl/sem_lib.py b/pyGHDL/libghdl/vhdl/sem_lib.py
index d2a807656..9fcc7ac79 100644
--- a/pyGHDL/libghdl/vhdl/sem_lib.py
+++ b/pyGHDL/libghdl/vhdl/sem_lib.py
@@ -7,12 +7,13 @@
# |_| |___/ |___/
# =============================================================================
# Authors: Tristan Gingold
+# Patrick Lehmann
#
-# Package package: Python binding and low-level API for shared library 'libghdl'.
+# Package module: Python binding and low-level API for shared library 'libghdl'.
#
# License:
# ============================================================================
-# Copyright (C) 2019-2020 Tristan Gingold
+# Copyright (C) 2019-2021 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
@@ -32,11 +33,39 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ============================================================================
#
+from pydecor import export
+
from pyGHDL.libghdl import libghdl
+from pyGHDL.libghdl._types import SourceFileEntry
+
+
+@export
+def Load_File(File: SourceFileEntry):
+ """
+ Start to analyse a file (i.e. load and parse it).
+
+ :param File: File to analyse.
+ :return: Return :attr:`~pyGHDL.libghdl.vhdl.nodes.Null_Iir` in case of parse error. Type: ``Iir_Design_File``
+ """
+ return libghdl.vhdl__sem_lib__load_file(File)
+
+
+@export
+def Finish_Compilation(Unit, Main: bool = False) -> None:
+ """
+ Analyze :obj:`Unit`.
+ :param Unit: Design unit to analyze.
+ :param Main: Is main unit.
+ """
+ libghdl.vhdl__sem_lib__finish_compilation(Unit, Main)
-Load_File = libghdl.vhdl__sem_lib__load_file
-Finish_Compilation = libghdl.vhdl__sem_lib__finish_compilation
+@export
+def Free_Dependence_List(Design) -> None:
+ """
+ Free the dependence list of :obj:`Design`.
-Free_Dependence_List = libghdl.vhdl__sem_lib__free_dependence_list
+ :param Design: Design unit to free dependencies for.
+ """
+ libghdl.vhdl__sem_lib__free_dependence_list(Design)