From a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 1 Oct 2019 06:09:55 +0200 Subject: synth: improve support of arrays or arrays. Fix #955 --- src/vhdl/vhdl-utils.adb | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/vhdl') diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb index 4269bdbf2..a3f0f3223 100644 --- a/src/vhdl/vhdl-utils.adb +++ b/src/vhdl/vhdl-utils.adb @@ -1043,6 +1043,14 @@ package body Vhdl.Utils is return Get_Nbr_Elements (Get_Index_Subtype_List (Array_Type)); end Get_Nbr_Dimensions; + function Is_One_Dimensional_Array_Type (A_Type : Iir) return Boolean + is + Base_Type : constant Iir := Get_Base_Type (A_Type); + begin + return Get_Kind (Base_Type) = Iir_Kind_Array_Type_Definition + and then Get_Nbr_Dimensions (Base_Type) = 1; + end Is_One_Dimensional_Array_Type; + function Are_Array_Indexes_Locally_Static (Array_Type : Iir) return Boolean is Indexes : constant Iir_Flist := Get_Index_Subtype_List (Array_Type); @@ -1407,19 +1415,6 @@ package body Vhdl.Utils is end case; end Get_High_Limit; - function Is_One_Dimensional_Array_Type (A_Type : Iir) return Boolean - is - Base_Type : constant Iir := Get_Base_Type (A_Type); - begin - if Get_Kind (Base_Type) = Iir_Kind_Array_Type_Definition - and then Get_Nbr_Elements (Get_Index_Subtype_List (Base_Type)) = 1 - then - return True; - else - return False; - end if; - end Is_One_Dimensional_Array_Type; - function Is_Range_Attribute_Name (Expr : Iir) return Boolean is Attr : Iir; -- cgit v1.2.3