diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-09-18 20:20:35 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-09-19 06:32:17 +0200 |
commit | f659edc23a249a35e78956054afed0fdc256d127 (patch) | |
tree | ec0b5062ccc079d1a4b03bc19cc61740055c8b66 /src | |
parent | abcd3c1130fe8504fcc0dc31f1b7e031ee7a5fcf (diff) | |
download | ghdl-f659edc23a249a35e78956054afed0fdc256d127.tar.gz ghdl-f659edc23a249a35e78956054afed0fdc256d127.tar.bz2 ghdl-f659edc23a249a35e78956054afed0fdc256d127.zip |
synth: handle unconnected out ports.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-insts.adb | 13 |
1 files changed, 8 insertions, 5 deletions
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); |