aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/simulate/simul-execution.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/simulate/simul-execution.adb')
-rw-r--r--src/vhdl/simulate/simul-execution.adb24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/vhdl/simulate/simul-execution.adb b/src/vhdl/simulate/simul-execution.adb
index 2cd3ab2f5..47b79b369 100644
--- a/src/vhdl/simulate/simul-execution.adb
+++ b/src/vhdl/simulate/simul-execution.adb
@@ -74,23 +74,29 @@ package body Simul.Execution is
| Kind_Process =>
declare
Current : Block_Instance_Acc;
- -- Last : Block_Instance_Acc;
begin
Current := Instance;
while Current /= null loop
if Current.Block_Scope = Scope then
return Current;
end if;
- -- Last := Current;
Current := Current.Up_Block;
end loop;
- -- if Scope.Frame_Scope.Depth = 0
- -- and then (Last.Block_Scope.Frame_Scope.Kind
- -- = Scope_Kind_Package)
- -- then
- -- -- For instantiated packages.
- -- return Last;
- -- end if;
+ raise Internal_Error;
+ end;
+ when Kind_Protected =>
+ declare
+ Current : Block_Instance_Acc;
+ begin
+ Current := Instance;
+ while Current /= null loop
+ if Current.Block_Scope = Scope
+ or Current.Uninst_Scope = Scope
+ then
+ return Current;
+ end if;
+ Current := Current.Up_Block;
+ end loop;
raise Internal_Error;
end;
when Kind_Package =>