diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-09-03 04:41:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-09-03 04:41:55 +0200 |
commit | 6d8c5299f20b4cd8f1e049f7eea454c00a3102b7 (patch) | |
tree | e06fd1ab55f2398d2e121ad6d7a7b3236aaeda6b /iirs_utils.adb | |
parent | e6ffb98cb5ad3f07bcaf79323d8ab8411688c494 (diff) | |
download | ghdl-6d8c5299f20b4cd8f1e049f7eea454c00a3102b7.tar.gz ghdl-6d8c5299f20b4cd8f1e049f7eea454c00a3102b7.tar.bz2 ghdl-6d8c5299f20b4cd8f1e049f7eea454c00a3102b7.zip |
Fix ghdl_simul (after previous change).
Diffstat (limited to 'iirs_utils.adb')
-rw-r--r-- | iirs_utils.adb | 30 |
1 files changed, 30 insertions, 0 deletions
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 |