From b5884712a4ce8980831d4b231d123688063ccbf2 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 21 Jun 2022 23:10:26 +0200 Subject: Enable and disable AMS support based on VHDLVersion. (cherry picked from commit 04d141309147a5731ea3461d59cfc8e17ad57c82) --- pyGHDL/libghdl/flags.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index fadd3bb52..523b6c9cf 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -41,6 +41,7 @@ __all__ = [ "Verbose", "Flag_Elaborate_With_Outdated", "Flag_Force_Analysis", + "AMS_Vhdl", "Flag_Gather_Comments", ] @@ -54,4 +55,6 @@ Flag_Elaborate_With_Outdated = c_bool.in_dll(libghdl, "flags__flag_elaborate_wit Flag_Force_Analysis = c_bool.in_dll(libghdl, "flags__flag_force_analysis") +AMS_Vhdl = c_bool.in_dll(libghdl, "flags__ams_vhdl") + Flag_Gather_Comments = c_bool.in_dll(libghdl, "flags__flag_gather_comments") -- cgit v1.2.3 From 53fbe284740a23af5457fe12abd4715eb2309abd Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 22 Jun 2022 09:03:55 +0200 Subject: Exposed new flags from libghdl: mb_comment, fexplicit, frelaxed. (cherry picked from commit 2a78cc687299c5bc0f4f65127957dbe4d7176027) --- pyGHDL/libghdl/flags.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index 523b6c9cf..1eca1544f 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -49,7 +49,10 @@ assert sizeof(c_bool) == 1 Flag_Elocations = c_bool.in_dll(libghdl, "flags__flag_elocations") -Verbose = c_bool.in_dll(libghdl, "flags__verbose") +Verbose = c_bool.in_dll(libghdl, "flags__verbose") #: Internal boolean flag representing :option:`-v`. +MB_Comment = c_bool.in_dll(libghdl, "flags__mb_comment") #: Internal boolean flag representing :option:`--mb-comments`. +Explicit = c_bool.in_dll(libghdl, "flags__flag_explicit") #: Internal boolean flag representing :option:`-fexplicit`. +Relaxed = c_bool.in_dll(libghdl, "flags__flag_relaxed_rules") #: Internal boolean flag representing :option:`-frelaxed`. Flag_Elaborate_With_Outdated = c_bool.in_dll(libghdl, "flags__flag_elaborate_with_outdated") -- cgit v1.2.3 From 960e44185ac356cca07d9d2eb6386e0286e31270 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Wed, 22 Jun 2022 20:19:57 +0200 Subject: Added new flag variables to __all__. (cherry picked from commit a51422a1fd1c11a7add7b3ee799b93b98d5f20f0) --- pyGHDL/libghdl/flags.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index 1eca1544f..4bf30ef50 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -39,6 +39,9 @@ from pyGHDL.libghdl import libghdl __all__ = [ "Flag_Elocations", "Verbose", + "MB_Comment", + "Explicit", + "Relaxed", "Flag_Elaborate_With_Outdated", "Flag_Force_Analysis", "AMS_Vhdl", @@ -49,10 +52,10 @@ assert sizeof(c_bool) == 1 Flag_Elocations = c_bool.in_dll(libghdl, "flags__flag_elocations") -Verbose = c_bool.in_dll(libghdl, "flags__verbose") #: Internal boolean flag representing :option:`-v`. -MB_Comment = c_bool.in_dll(libghdl, "flags__mb_comment") #: Internal boolean flag representing :option:`--mb-comments`. -Explicit = c_bool.in_dll(libghdl, "flags__flag_explicit") #: Internal boolean flag representing :option:`-fexplicit`. -Relaxed = c_bool.in_dll(libghdl, "flags__flag_relaxed_rules") #: Internal boolean flag representing :option:`-frelaxed`. +Verbose = c_bool.in_dll(libghdl, "flags__verbose") #: Internal boolean flag representing :option:`-v`. +MB_Comment = c_bool.in_dll(libghdl, "flags__mb_comment") #: Internal boolean flag representing :option:`--mb-comment`. +Explicit = c_bool.in_dll(libghdl, "flags__flag_explicit") #: Internal boolean flag representing :option:`-fexplicit`. +Relaxed = c_bool.in_dll(libghdl, "flags__flag_relaxed_rules") #: Internal boolean flag representing :option:`-frelaxed`. Flag_Elaborate_With_Outdated = c_bool.in_dll(libghdl, "flags__flag_elaborate_with_outdated") -- cgit v1.2.3 From f0f7b022b35aac03d586fd23b1ee6700cca60bcf Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 24 Jun 2022 23:20:48 +0200 Subject: Improved doc-strings. (cherry picked from commit 54ce76e3938413f9ee7d823cf63611c4ff5d8faf) --- pyGHDL/libghdl/flags.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index 4bf30ef50..4e5f73d00 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -50,6 +50,20 @@ __all__ = [ assert sizeof(c_bool) == 1 + +@export +@unique +class VhdlStandard(IntEnum): + """An enumeration representing libghdl's internal ``Vhdl_Std_Type`` enumeration type.""" + + Vhdl_87 = 0 #: VHDL'87 + Vhdl_93 = 1 #: VHDL'93 + Vhdl_00 = 2 #: VHDL'2000 + Vhdl_02 = 3 #: VHDL'2002 + Vhdl_08 = 4 #: VHDL'2008 + Vhdl_19 = 5 #: VHDL'2019 + + Flag_Elocations = c_bool.in_dll(libghdl, "flags__flag_elocations") Verbose = c_bool.in_dll(libghdl, "flags__verbose") #: Internal boolean flag representing :option:`-v`. -- cgit v1.2.3 From e2f88a56ffc73b8df5eb501ad59a8112d23ea35c Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 25 Jun 2022 10:44:29 +0200 Subject: Formatting by black. (cherry picked from commit 68f9ef6f18ac454dd25a180c6bf1046c8172174d) --- pyGHDL/libghdl/flags.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index 4e5f73d00..26d548cd5 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -56,20 +56,22 @@ assert sizeof(c_bool) == 1 class VhdlStandard(IntEnum): """An enumeration representing libghdl's internal ``Vhdl_Std_Type`` enumeration type.""" - Vhdl_87 = 0 #: VHDL'87 - Vhdl_93 = 1 #: VHDL'93 - Vhdl_00 = 2 #: VHDL'2000 - Vhdl_02 = 3 #: VHDL'2002 - Vhdl_08 = 4 #: VHDL'2008 - Vhdl_19 = 5 #: VHDL'2019 + Vhdl_87 = 0 #: VHDL'87 + Vhdl_93 = 1 #: VHDL'93 + Vhdl_00 = 2 #: VHDL'2000 + Vhdl_02 = 3 #: VHDL'2002 + Vhdl_08 = 4 #: VHDL'2008 + Vhdl_19 = 5 #: VHDL'2019 + - Flag_Elocations = c_bool.in_dll(libghdl, "flags__flag_elocations") Verbose = c_bool.in_dll(libghdl, "flags__verbose") #: Internal boolean flag representing :option:`-v`. MB_Comment = c_bool.in_dll(libghdl, "flags__mb_comment") #: Internal boolean flag representing :option:`--mb-comment`. Explicit = c_bool.in_dll(libghdl, "flags__flag_explicit") #: Internal boolean flag representing :option:`-fexplicit`. -Relaxed = c_bool.in_dll(libghdl, "flags__flag_relaxed_rules") #: Internal boolean flag representing :option:`-frelaxed`. +Relaxed = c_bool.in_dll( + libghdl, "flags__flag_relaxed_rules" +) #: Internal boolean flag representing :option:`-frelaxed`. Flag_Elaborate_With_Outdated = c_bool.in_dll(libghdl, "flags__flag_elaborate_with_outdated") -- cgit v1.2.3 From 627d081090583be67093bd717cb54d1dde44b58c Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 24 Dec 2022 10:14:04 +0100 Subject: Added missing imports. --- pyGHDL/libghdl/flags.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index 26d548cd5..580828d0a 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -33,6 +33,9 @@ # ============================================================================ from ctypes import c_bool, sizeof +from enum import unique, IntEnum + +from pyTooling.Decorators import export from pyGHDL.libghdl import libghdl -- cgit v1.2.3 From 1e5aad63f64ff9b91b1a10c16f82fa29de42dbb4 Mon Sep 17 00:00:00 2001 From: tgingold Date: Sat, 24 Dec 2022 12:03:44 +0100 Subject: Update pyGHDL/libghdl/flags.py Co-authored-by: Patrick Lehmann --- pyGHDL/libghdl/flags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyGHDL/libghdl/flags.py') diff --git a/pyGHDL/libghdl/flags.py b/pyGHDL/libghdl/flags.py index 580828d0a..dc5da6d60 100644 --- a/pyGHDL/libghdl/flags.py +++ b/pyGHDL/libghdl/flags.py @@ -80,6 +80,6 @@ Flag_Elaborate_With_Outdated = c_bool.in_dll(libghdl, "flags__flag_elaborate_wit Flag_Force_Analysis = c_bool.in_dll(libghdl, "flags__flag_force_analysis") -AMS_Vhdl = c_bool.in_dll(libghdl, "flags__ams_vhdl") +AMS_Vhdl = c_bool.in_dll(libghdl, "flags__ams_vhdl") #: Internal boolean flag representing :option:`-ams`. Flag_Gather_Comments = c_bool.in_dll(libghdl, "flags__flag_gather_comments") -- cgit v1.2.3