From b85eed7c60560dc5d3027939e887180634f25168 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 7 Dec 2017 06:05:09 +0100 Subject: simul: handle optional body for package instantiation. --- src/vhdl/simulate/simul-elaboration.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/vhdl/simulate/simul-elaboration.adb b/src/vhdl/simulate/simul-elaboration.adb index 21ec74a19..0eb6047c1 100644 --- a/src/vhdl/simulate/simul-elaboration.adb +++ b/src/vhdl/simulate/simul-elaboration.adb @@ -426,8 +426,11 @@ package body Simul.Elaboration is Bod : constant Iir := Get_Package_Body (Uninst); begin Instance.Uninst_Scope := Get_Info (Uninst); - Elaborate_Declarative_Part - (Instance, Get_Declaration_Chain (Bod)); + if Is_Valid (Bod) then + -- Body is optional. + Elaborate_Declarative_Part + (Instance, Get_Declaration_Chain (Bod)); + end if; end; end if; end if; -- cgit v1.2.3