From 2f4984b58d64d050f47da258e7e40a8c5701b7a3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 7 Oct 2019 18:25:26 +0200 Subject: synth: allow unconnected port. --- src/synth/synth-insts.adb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/synth') diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb index 12703bc64..66a6bb2fb 100644 --- a/src/synth/synth-insts.adb +++ b/src/synth/synth-insts.adb @@ -614,11 +614,13 @@ package body Synth.Insts is null; when Port_Out | Port_Inout => - Port := Get_Output (Inst, Nbr_Outputs); - Port := Builders.Build_Port (Get_Build (Syn_Inst), Port); - O := Create_Value_Net - (Port, Get_Value_Type (Comp_Inst, Get_Type (Inter))); - Synth_Assignment (Syn_Inst, Actual, O, Assoc); + if Actual /= Null_Node then + Port := Get_Output (Inst, Nbr_Outputs); + Port := Builders.Build_Port (Get_Build (Syn_Inst), Port); + O := Create_Value_Net + (Port, Get_Value_Type (Comp_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