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.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vhdl/simulate/simul-execution.adb b/src/vhdl/simulate/simul-execution.adb
index c4cfa7404..ae3818792 100644
--- a/src/vhdl/simulate/simul-execution.adb
+++ b/src/vhdl/simulate/simul-execution.adb
@@ -3301,8 +3301,9 @@ package body Simul.Execution is
Up_Info := Get_Info_For_Scope (Parent);
Up_Block := Get_Instance_By_Scope (Instance, Up_Info);
- Origin := Sem_Inst.Get_Origin (Imp);
- if Origin /= Null_Iir then
+ if Up_Block.Uninst_Scope /= null then
+ Origin := Sem_Inst.Get_Origin (Imp);
+ pragma Assert (Origin /= Null_Iir);
-- Call to a subprogram of an instantiated package.
-- For a generic package, only the spec is instantiated, the body
-- is shared by all the instances.