diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-13 18:57:12 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-13 18:57:12 +0100 |
commit | 48a142fc1625dc7ecb1602f3dbd46882e53d96a6 (patch) | |
tree | 5f8c9a004f5b7e9f93ed032c4c4d671616ea9b06 /src | |
parent | a7fc811243abef3bd4428c3368e7ae5b105322a0 (diff) | |
download | ghdl-48a142fc1625dc7ecb1602f3dbd46882e53d96a6.tar.gz ghdl-48a142fc1625dc7ecb1602f3dbd46882e53d96a6.tar.bz2 ghdl-48a142fc1625dc7ecb1602f3dbd46882e53d96a6.zip |
synth-insts: handle slice name as actual to unbounded
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-insts.adb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb index 52f8471a2..2703ae74a 100644 --- a/src/synth/synth-insts.adb +++ b/src/synth/synth-insts.adb @@ -761,6 +761,26 @@ package body Synth.Insts is end; when Iir_Kind_Simple_Name => return Synth_Type_Of_Object (Syn_Inst, Get_Named_Entity (Expr)); + when Iir_Kind_Slice_Name => + declare + Pfx_Typ : Type_Acc; + Pfx_Bnd : Bound_Type; + El_Typ : Type_Acc; + Res_Bnd : Bound_Type; + Sl_Voff : Net; + Sl_Off : Uns32; + Wd : Uns32; + begin + Pfx_Typ := Synth_Type_Of_Object (Syn_Inst, Get_Prefix (Expr)); + Get_Onedimensional_Array_Bounds (Pfx_Typ, Pfx_Bnd, El_Typ); + Synth_Slice_Suffix (Syn_Inst, Expr, Pfx_Bnd, El_Typ.W, + Res_Bnd, Sl_Voff, Sl_Off, Wd); + + if Sl_Voff /= No_Net then + raise Internal_Error; + end if; + return Create_Onedimensional_Array_Subtype (Pfx_Typ, Res_Bnd); + end; when others => Vhdl.Errors.Error_Kind ("synth_type_of_object", Expr); end case; |