aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/simulate/simul-elaboration.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-12-05 04:36:09 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-05 04:36:09 +0100
commit619a6e10cbcd439ba2a499ea74357774e9d4ffae (patch)
treecc38138c1c06cf7cb69ec26965aeea4835882258 /src/vhdl/simulate/simul-elaboration.adb
parent6fa695890d8ccae675f3606d25e2bb58bbfb243e (diff)
downloadghdl-619a6e10cbcd439ba2a499ea74357774e9d4ffae.tar.gz
ghdl-619a6e10cbcd439ba2a499ea74357774e9d4ffae.tar.bz2
ghdl-619a6e10cbcd439ba2a499ea74357774e9d4ffae.zip
simul: handle package interface, remove iir_value_environment.
Diffstat (limited to 'src/vhdl/simulate/simul-elaboration.adb')
-rw-r--r--src/vhdl/simulate/simul-elaboration.adb11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/vhdl/simulate/simul-elaboration.adb b/src/vhdl/simulate/simul-elaboration.adb
index 9ca1e5eaf..57088afd5 100644
--- a/src/vhdl/simulate/simul-elaboration.adb
+++ b/src/vhdl/simulate/simul-elaboration.adb
@@ -149,8 +149,7 @@ package body Simul.Elaboration is
| Iir_Value_Protected
| Iir_Value_Quantity
| Iir_Value_Terminal
- | Iir_Value_Instance
- | Iir_Value_Environment =>
+ | Iir_Value_Instance =>
raise Internal_Error;
end case;
return Res;
@@ -1060,7 +1059,7 @@ package body Simul.Elaboration is
-- expression associated with the generic constant is evaluated
-- to determine the value of the constant.
when Iir_Kind_Interface_Package_Declaration =>
- Create_Object (Instance, Get_Info (Decl).Env_Slot);
+ Create_Object (Instance, Get_Info (Decl).Pkg_Slot);
when others =>
Error_Kind ("elaborate_generic_clause", Decl);
end case;
@@ -1154,10 +1153,8 @@ package body Simul.Elaboration is
Pkg_Block : Block_Instance_Acc;
begin
Pkg_Block := Get_Instance_By_Scope (Local_Instance, Info);
- Environment_Table.Append (Pkg_Block);
- Val := Create_Environment_Value (Environment_Table.Last);
- Target_Instance.Objects (Get_Info (Inter).Env_Slot) :=
- Unshare (Val, Instance_Pool);
+ Target_Instance.Objects (Get_Info (Inter).Pkg_Slot) :=
+ Create_Instance_Value (Pkg_Block);
end;
goto Continue;