aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/std_names.adb1
-rw-r--r--src/std_names.ads19
-rw-r--r--src/vhdl/vhdl-sem.adb31
3 files changed, 36 insertions, 15 deletions
diff --git a/src/std_names.adb b/src/std_names.adb
index 3e7a769d5..649029ff7 100644
--- a/src/std_names.adb
+++ b/src/std_names.adb
@@ -621,6 +621,7 @@ package body Std_Names is
Def ("ieee", Name_Ieee);
Def ("std_logic_1164", Name_Std_Logic_1164);
Def ("vital_timing", Name_VITAL_Timing);
+ Def ("vital_primitives", Name_VITAL_Primitives);
Def ("numeric_std", Name_Numeric_Std);
Def ("numeric_bit", Name_Numeric_Bit);
Def ("numeric_std_unsigned", Name_Numeric_Std_Unsigned);
diff --git a/src/std_names.ads b/src/std_names.ads
index 1a69d46bc..d27494d26 100644
--- a/src/std_names.ads
+++ b/src/std_names.ads
@@ -703,15 +703,16 @@ package Std_Names is
Name_Ieee : constant Name_Id := Name_First_Ieee_Pkg + 000;
Name_Std_Logic_1164 : constant Name_Id := Name_First_Ieee_Pkg + 001;
Name_VITAL_Timing : constant Name_Id := Name_First_Ieee_Pkg + 002;
- Name_Numeric_Std : constant Name_Id := Name_First_Ieee_Pkg + 003;
- Name_Numeric_Bit : constant Name_Id := Name_First_Ieee_Pkg + 004;
- Name_Numeric_Std_Unsigned : constant Name_Id := Name_First_Ieee_Pkg + 005;
- Name_Std_Logic_Arith : constant Name_Id := Name_First_Ieee_Pkg + 006;
- Name_Std_Logic_Signed : constant Name_Id := Name_First_Ieee_Pkg + 007;
- Name_Std_Logic_Unsigned : constant Name_Id := Name_First_Ieee_Pkg + 008;
- Name_Std_Logic_Textio : constant Name_Id := Name_First_Ieee_Pkg + 009;
- Name_Std_Logic_Misc : constant Name_Id := Name_First_Ieee_Pkg + 010;
- Name_Math_Real : constant Name_Id := Name_First_Ieee_Pkg + 011;
+ Name_VITAL_Primitives : constant Name_Id := Name_First_Ieee_Pkg + 003;
+ Name_Numeric_Std : constant Name_Id := Name_First_Ieee_Pkg + 004;
+ Name_Numeric_Bit : constant Name_Id := Name_First_Ieee_Pkg + 005;
+ Name_Numeric_Std_Unsigned : constant Name_Id := Name_First_Ieee_Pkg + 006;
+ Name_Std_Logic_Arith : constant Name_Id := Name_First_Ieee_Pkg + 007;
+ Name_Std_Logic_Signed : constant Name_Id := Name_First_Ieee_Pkg + 008;
+ Name_Std_Logic_Unsigned : constant Name_Id := Name_First_Ieee_Pkg + 009;
+ Name_Std_Logic_Textio : constant Name_Id := Name_First_Ieee_Pkg + 010;
+ Name_Std_Logic_Misc : constant Name_Id := Name_First_Ieee_Pkg + 011;
+ Name_Math_Real : constant Name_Id := Name_First_Ieee_Pkg + 012;
Name_Last_Ieee_Pkg : constant Name_Id := Name_Math_Real;
Name_First_Ieee_Name : constant Name_Id := Name_Last_Ieee_Pkg + 1;
diff --git a/src/vhdl/vhdl-sem.adb b/src/vhdl/vhdl-sem.adb
index 74a0dfc85..d24652797 100644
--- a/src/vhdl/vhdl-sem.adb
+++ b/src/vhdl/vhdl-sem.adb
@@ -1995,13 +1995,32 @@ package body Vhdl.Sem is
end loop;
end;
- -- Mark the procedure as suspendable, unless in a std packages.
+ -- Mark the procedure as suspendable, unless in a std or
+ -- most ieee packages.
-- This is a minor optimization.
- if Get_Library (Get_Design_File (Get_Current_Design_Unit))
- /= Libraries.Std_Library
- then
- Set_Suspend_Flag (Subprg, True);
- end if;
+ declare
+ Lib : constant Iir :=
+ Get_Library (Get_Design_File (Get_Current_Design_Unit));
+ begin
+ if Lib = Libraries.Std_Library then
+ -- No procedures in std have a wait statement.
+ null;
+ elsif Get_Identifier (Lib) = Std_Names.Name_Ieee then
+ -- Package ieee.vital_primitives has wait statements.
+ declare
+ Unit : constant Iir :=
+ Get_Library_Unit (Get_Current_Design_Unit);
+ Unit_Id : constant Name_Id := Get_Identifier (Unit);
+ begin
+ if Unit_Id = Std_Names.Name_VITAL_Primitives then
+ Set_Suspend_Flag (Subprg, True);
+ end if;
+ end;
+ else
+ -- User procedures may have wait statements.
+ Set_Suspend_Flag (Subprg, True);
+ end if;
+ end;
when others =>
Error_Kind ("sem_subprogram_declaration", Subprg);
end case;