aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-utils.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-01 06:09:55 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-01 06:09:55 +0200
commita7d9aa91b5a9f4847edf71c80b70cfec6d646fd9 (patch)
tree84f3c18584169d3582efe6a3f2a6bdb1b024f47a /src/vhdl/vhdl-utils.adb
parentbb00cae25caff518b54c28ba8cc6ee7381fdf2ac (diff)
downloadghdl-a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9.tar.gz
ghdl-a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9.tar.bz2
ghdl-a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9.zip
synth: improve support of arrays or arrays. Fix #955
Diffstat (limited to 'src/vhdl/vhdl-utils.adb')
-rw-r--r--src/vhdl/vhdl-utils.adb21
1 files changed, 8 insertions, 13 deletions
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;