aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/simulate/simul-execution.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-12-21 18:54:54 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-21 18:54:54 +0100
commit0077cb6ed63946940700bbfd60518b0d28bc3ce2 (patch)
treefdad4be06f42dd2ef4c72665aa60a574a4676484 /src/vhdl/simulate/simul-execution.adb
parent9c79e3faf7ba29c9767fed41f0c7840bdedea3e9 (diff)
downloadghdl-0077cb6ed63946940700bbfd60518b0d28bc3ce2.tar.gz
ghdl-0077cb6ed63946940700bbfd60518b0d28bc3ce2.tar.bz2
ghdl-0077cb6ed63946940700bbfd60518b0d28bc3ce2.zip
simul: add Kind_Protected instead of reusing Kind_Frame.
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 =>