aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-20 06:56:19 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-20 06:58:21 +0100
commita8379ef707865fb4aebe2d1941377989f5cd01d3 (patch)
treef4763ab589a754ac48418adf3a0641c80bc91049 /src/synth
parent5bc6c29c5b420ef68031e348f081778e3673555f (diff)
downloadghdl-a8379ef707865fb4aebe2d1941377989f5cd01d3.tar.gz
ghdl-a8379ef707865fb4aebe2d1941377989f5cd01d3.tar.bz2
ghdl-a8379ef707865fb4aebe2d1941377989f5cd01d3.zip
synth-static_oper: handle element/array concat.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-static_oper.adb20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb
index 7d5e24fa4..e366aefb9 100644
--- a/src/synth/synth-static_oper.adb
+++ b/src/synth/synth-static_oper.adb
@@ -382,6 +382,26 @@ package body Synth.Static_Oper is
end loop;
return Create_Value_Const_Array (Res_Typ, Arr);
end;
+ when Iir_Predefined_Element_Array_Concat =>
+ declare
+ Ret_Typ : constant Type_Acc :=
+ Get_Value_Type (Syn_Inst, Get_Return_Type (Imp));
+ Bnd : Bound_Type;
+ Res_Typ : Type_Acc;
+ Arr : Value_Array_Acc;
+ begin
+ Bnd := Oper.Create_Bounds_From_Length
+ (Syn_Inst, Get_Index_Type (Get_Type (Expr), 0),
+ 1 + Right.Arr.Len);
+ Res_Typ := Create_Onedimensional_Array_Subtype
+ (Ret_Typ, Bnd);
+ Arr := Create_Value_Array (1 + Right.Arr.Len);
+ Arr.V (1) := Left;
+ for I in Right.Arr.V'Range loop
+ Arr.V (1 + I) := Right.Arr.V (I);
+ end loop;
+ return Create_Value_Const_Array (Res_Typ, Arr);
+ end;
when Iir_Predefined_Array_Equality
| Iir_Predefined_Record_Equality =>