From 88215549497e4ec8f1e55325a87e3155626a8a3b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 11 Jan 2020 18:12:28 +0100 Subject: synth: use formal instance to evaluate default value. For #1080 --- src/synth/synth-insts.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb index 46616484a..f58770622 100644 --- a/src/synth/synth-insts.adb +++ b/src/synth/synth-insts.adb @@ -563,10 +563,12 @@ package body Synth.Insts is is Actual : Node; Formal_Typ : Type_Acc; + Act_Inst : Synth_Instance_Acc; begin case Iir_Kinds_Association_Element_Parameters (Get_Kind (Assoc)) is when Iir_Kind_Association_Element_Open => Actual := Get_Default_Value (Inter); + Act_Inst := Inter_Inst; when Iir_Kind_Association_Element_By_Expression => Actual := Get_Actual (Assoc); if Get_Kind (Actual) = Iir_Kind_Reference_Name then @@ -577,6 +579,7 @@ package body Synth.Insts is (Get_Kind (Actual) = Iir_Kind_Anonymous_Signal_Declaration); Actual := Get_Expression (Actual); end if; + Act_Inst := Syn_Inst; when Iir_Kind_Association_Element_By_Individual => Synth_Individual_Input_Assoc (Inp, Syn_Inst, Assoc, Inter_Inst); return; @@ -586,7 +589,7 @@ package body Synth.Insts is Connect (Inp, Get_Net (Synth_Expression_With_Type - (Syn_Inst, Actual, Formal_Typ))); + (Act_Inst, Actual, Formal_Typ))); end Synth_Input_Assoc; procedure Synth_Individual_Output_Assoc (Outp : Net; -- cgit v1.2.3