From 6d8c5299f20b4cd8f1e049f7eea454c00a3102b7 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 3 Sep 2014 04:41:55 +0200 Subject: Fix ghdl_simul (after previous change). --- iirs_utils.adb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'iirs_utils.adb') diff --git a/iirs_utils.adb b/iirs_utils.adb index 310fffa3f..9dc3c6ecf 100644 --- a/iirs_utils.adb +++ b/iirs_utils.adb @@ -799,6 +799,36 @@ package body Iirs_Utils is end case; end Get_Entity_Identifier_Of_Architecture; + function Is_Component_Instantiation + (Inst : Iir_Component_Instantiation_Statement) + return Boolean is + begin + case Get_Kind (Get_Instantiated_Unit (Inst)) is + when Iir_Kinds_Denoting_Name => + return True; + when Iir_Kind_Entity_Aspect_Entity + | Iir_Kind_Entity_Aspect_Configuration => + return False; + when others => + Error_Kind ("is_component_instantiation", Inst); + end case; + end Is_Component_Instantiation; + + function Is_Entity_Instantiation + (Inst : Iir_Component_Instantiation_Statement) + return Boolean is + begin + case Get_Kind (Get_Instantiated_Unit (Inst)) is + when Iir_Kinds_Denoting_Name => + return False; + when Iir_Kind_Entity_Aspect_Entity + | Iir_Kind_Entity_Aspect_Configuration => + return True; + when others => + Error_Kind ("is_entity_instantiation", Inst); + end case; + end Is_Entity_Instantiation; + function Get_String_Type_Bound_Type (Sub_Type : Iir) return Iir is begin if Get_Kind (Sub_Type) /= Iir_Kind_Array_Subtype_Definition then -- cgit v1.2.3