From f659edc23a249a35e78956054afed0fdc256d127 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 18 Sep 2019 20:20:35 +0200 Subject: synth: handle unconnected out ports. --- src/synth/synth-insts.adb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb index 6e04fc2a8..fc9037095 100644 --- a/src/synth/synth-insts.adb +++ b/src/synth/synth-insts.adb @@ -304,11 +304,14 @@ package body Synth.Insts is Nbr_Inputs := Nbr_Inputs + 1; when Port_Out | Port_Inout => - Port := Get_Output (Inst, Nbr_Outputs); - Port := Builders.Build_Port (Build_Context, Port); - O := Create_Value_Net - (Port, Get_Value_Type (Inst_Obj.Syn_Inst, Get_Type (Inter))); - Synth_Assignment (Syn_Inst, Actual, O, Assoc); + if Actual /= Null_Iir then + Port := Get_Output (Inst, Nbr_Outputs); + Port := Builders.Build_Port (Build_Context, Port); + O := Create_Value_Net + (Port, Get_Value_Type (Inst_Obj.Syn_Inst, + Get_Type (Inter))); + Synth_Assignment (Syn_Inst, Actual, O, Assoc); + end if; Nbr_Outputs := Nbr_Outputs + 1; end case; Next_Association_Interface (Assoc, Assoc_Inter); -- cgit v1.2.3