From 9ee3c82ab5a0b59eef5c91181dd282e7f5bcac61 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 4 Dec 2017 03:39:59 +0100 Subject: simul: WIP for nested packages. --- src/vhdl/simulate/simul-execution.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/vhdl/simulate/simul-execution.adb') diff --git a/src/vhdl/simulate/simul-execution.adb b/src/vhdl/simulate/simul-execution.adb index 7876c04ba..c8320ecf0 100644 --- a/src/vhdl/simulate/simul-execution.adb +++ b/src/vhdl/simulate/simul-execution.adb @@ -94,8 +94,12 @@ package body Simul.Execution is raise Internal_Error; end; when Kind_Package => - pragma Assert (Scope.Pkg_Parent = Global_Info); - return Global_Instances.Objects (Scope.Pkg_Slot).Instance; + declare + Parent : Block_Instance_Acc; + begin + Parent := Get_Instance_By_Scope (Instance, Scope.Pkg_Parent); + return Parent.Objects (Scope.Pkg_Slot).Instance; + end; when others => raise Internal_Error; end case; -- cgit v1.2.3