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/synth/synth-oper.adb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/synth/synth-oper.adb') diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index 096bbba44..865326e95 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -585,7 +585,7 @@ package body Synth.Oper is Iir_Index32 (Get_Width (L) + 1)); return Create_Value_Net - (N, Create_Vector_Type (Bnd, Right.Typ)); + (N, Create_Onedimensional_Array_Subtype (Left_Typ, Bnd)); end; when Iir_Predefined_Element_Array_Concat => declare @@ -601,10 +601,12 @@ package body Synth.Oper is Iir_Index32 (Get_Width (R) + 1)); return Create_Value_Net - (N, Create_Vector_Type (Bnd, Left.Typ)); + (N, Create_Onedimensional_Array_Subtype (Right_Typ, Bnd)); end; when Iir_Predefined_Element_Element_Concat => declare + Ret_Typ : constant Type_Acc := + Get_Value_Type (Syn_Inst, Get_Return_Type (Imp)); N : Net; Bnd : Bound_Type; begin @@ -614,7 +616,7 @@ package body Synth.Oper is Bnd := Create_Bounds_From_Length (Syn_Inst, Get_Index_Type (Get_Type (Expr), 0), 2); return Create_Value_Net - (N, Create_Vector_Type (Bnd, Left.Typ)); + (N, Create_Onedimensional_Array_Subtype (Ret_Typ, Bnd)); end; when Iir_Predefined_Array_Array_Concat => declare -- cgit v1.2.3