aboutsummaryrefslogtreecommitdiffstats
path: root/iirs_utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-06-26 07:56:54 +0200
committerTristan Gingold <tgingold@free.fr>2014-06-26 07:56:54 +0200
commit7fe7bdb1b5b0250c213526208a03445f58fba92d (patch)
tree7e210a0838c15943b6f69d2096bbe2405d68745d /iirs_utils.adb
parent8b3ec6b7edf3aedbe7084609881571d1603e9621 (diff)
downloadghdl-7fe7bdb1b5b0250c213526208a03445f58fba92d.tar.gz
ghdl-7fe7bdb1b5b0250c213526208a03445f58fba92d.tar.bz2
ghdl-7fe7bdb1b5b0250c213526208a03445f58fba92d.zip
add more support for vhdl2008: aliases, visibility and preliminary work for
generic packages.
Diffstat (limited to 'iirs_utils.adb')
-rw-r--r--iirs_utils.adb31
1 files changed, 31 insertions, 0 deletions
diff --git a/iirs_utils.adb b/iirs_utils.adb
index fa69e8e23..060c3f74e 100644
--- a/iirs_utils.adb
+++ b/iirs_utils.adb
@@ -860,6 +860,37 @@ package body Iirs_Utils is
end loop;
end Is_Signal_Object;
+ -- LRM08 4.7 Package declarations
+ -- If the package header is empty, the package declared by a package
+ -- declaration is called a simple package.
+ function Is_Simple_Package (Pkg : Iir) return Boolean is
+ begin
+ return Get_Package_Header (Pkg) = Null_Iir;
+ end Is_Simple_Package;
+
+ -- LRM08 4.7 Package declarations
+ -- If the package header contains a generic clause and no generic map
+ -- aspect, the package is called an uninstantiated package.
+ function Is_Uninstantiated_Package (Pkg : Iir) return Boolean
+ is
+ Header : constant Iir := Get_Package_Header (Pkg);
+ begin
+ return Header /= Null_Iir
+ and then Get_Generic_Map_Aspect_Chain (Header) = Null_Iir;
+ end Is_Uninstantiated_Package;
+
+ -- LRM08 4.7 Package declarations
+ -- If the package header contains both a generic clause and a generic
+ -- map aspect, the package is declared a generic-mapped package.
+ function Is_Generic_Mapped_Package (Pkg : Iir) return Boolean
+ is
+ Header : constant Iir := Get_Package_Header (Pkg);
+ begin
+ return Header /= Null_Iir
+ and then Get_Generic_Map_Aspect_Chain (Header) /= Null_Iir;
+ end Is_Generic_Mapped_Package;
+
+
function Get_HDL_Node (N : PSL_Node) return Iir is
begin
return Iir (PSL.Nodes.Get_HDL_Node (N));