aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-04-24 19:34:06 +0200
committerTristan Gingold <tgingold@free.fr>2023-04-24 19:34:06 +0200
commitd2c1b7a5c1a1f68e7b8f99f29c46d1f050452963 (patch)
treefcbd91a71e92c5f6f93f86c7b20e48b761cf9c86
parent6a7a3cbcf61cb5c2882265a21a8c4b130614786e (diff)
downloadghdl-d2c1b7a5c1a1f68e7b8f99f29c46d1f050452963.tar.gz
ghdl-d2c1b7a5c1a1f68e7b8f99f29c46d1f050452963.tar.bz2
ghdl-d2c1b7a5c1a1f68e7b8f99f29c46d1f050452963.zip
pyGHDL/libghdl: add more bindings to libghdl
-rw-r--r--pyGHDL/libghdl/libraries.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/pyGHDL/libghdl/libraries.py b/pyGHDL/libghdl/libraries.py
index f31d3ec5f..5050d5626 100644
--- a/pyGHDL/libghdl/libraries.py
+++ b/pyGHDL/libghdl/libraries.py
@@ -64,6 +64,13 @@ Library declaration for the work library.
Use the property ``.value`` to access the variable's value.
"""
+Work_Library_Name: NameId = c_int32.in_dll(libghdl, "libraries__work_library_name")
+"""
+Name of the 'WORK' library, usually 'work'.
+
+Use the property ``.value`` to access the variable's value.
+"""
+
@export
@BindToLibGHDL("libraries__get_libraries_chain")
@@ -134,6 +141,19 @@ def Get_Library_No_Create(Ident: NameId) -> Iir_Library_Declaration:
@export
+@BindToLibGHDL("libraries__get_library")
+def Get_Library(Ident: NameId, Loc: LocationType, Force: bool) -> Iir_Library_Declaration:
+ """
+ Get the library named :obj:`Ident`.
+
+ :param Ident: Library to look for.
+ :param Loc: Location in case of errors.
+ :return: Return :attr:`~pyGHDL.libghdl.vhdl.nodes.Null_Iir` if it doesn't exist.
+ """
+ return 0
+
+
+@export
@BindToLibGHDL("libraries__find_primary_unit")
def Find_Primary_Unit(Library: Iir_Library_Declaration, Name: NameId) -> Iir_Design_Unit:
"""
@@ -144,3 +164,14 @@ def Find_Primary_Unit(Library: Iir_Library_Declaration, Name: NameId) -> Iir_Des
:return: undocumented
"""
return 0
+
+
+@export
+@BindToLibGHDL("libraries__load_work_library")
+def Load_Work_Library(Empty: bool) -> None:
+ """
+ Load the work library whose name is ``Work_Library_Name``.
+
+ :param Empty: If set, just create it.
+ """
+ return