From 0e3f21903e7f4777feb29b9eec92fef08677a681 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 4 Apr 2022 06:32:03 +0200 Subject: synth: handle individual assoc of unbounded interface. Fix #2023 --- src/synth/elab-vhdl_insts.adb | 3 +++ src/synth/synth-vhdl_insts.adb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/synth') diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index 404684c26..56d458265 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -335,6 +335,9 @@ package body Elab.Vhdl_Insts is case Get_Kind (Assoc) is when Iir_Kinds_Association_Element_By_Actual => return Exec_Type_Of_Object (Syn_Inst, Get_Actual (Assoc)); + when Iir_Kind_Association_Element_By_Individual => + return Synth_Subtype_Indication + (Syn_Inst, Get_Actual_Type (Assoc)); when others => raise Internal_Error; end case; diff --git a/src/synth/synth-vhdl_insts.adb b/src/synth/synth-vhdl_insts.adb index ff3685978..9611bf038 100644 --- a/src/synth/synth-vhdl_insts.adb +++ b/src/synth/synth-vhdl_insts.adb @@ -621,7 +621,7 @@ package body Synth.Vhdl_Insts is case Get_Kind (Formal) is when Iir_Kind_Interface_Signal_Declaration => Off := 0; - Typ := Get_Subtype_Object (Inter_Inst, Get_Type (Formal)); + Typ := Get_Value (Inter_Inst, Formal).Typ; when Iir_Kind_Simple_Name => Synth_Individual_Prefix (Syn_Inst, Inter_Inst, Get_Named_Entity (Formal), Off, Typ); -- cgit v1.2.3