diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-01 06:09:55 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-01 06:09:55 +0200 |
commit | a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9 (patch) | |
tree | 84f3c18584169d3582efe6a3f2a6bdb1b024f47a /src/synth/synth-oper.adb | |
parent | bb00cae25caff518b54c28ba8cc6ee7381fdf2ac (diff) | |
download | ghdl-a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9.tar.gz ghdl-a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9.tar.bz2 ghdl-a7d9aa91b5a9f4847edf71c80b70cfec6d646fd9.zip |
synth: improve support of arrays or arrays. Fix #955
Diffstat (limited to 'src/synth/synth-oper.adb')
-rw-r--r-- | src/synth/synth-oper.adb | 8 |
1 files changed, 5 insertions, 3 deletions
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 |