diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-02-05 20:15:34 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-02-05 20:15:34 +0100 |
commit | 0140dddc253f8b755d3080885ae322b87606ae61 (patch) | |
tree | 950a8e1765f84bbfd03020bf0eb0d254499a23c9 /src | |
parent | 526a215d252c74702b774385c3c55cb8986fc344 (diff) | |
download | ghdl-0140dddc253f8b755d3080885ae322b87606ae61.tar.gz ghdl-0140dddc253f8b755d3080885ae322b87606ae61.tar.bz2 ghdl-0140dddc253f8b755d3080885ae322b87606ae61.zip |
synth-decls: set a default value to non-assigned signals. Fix #1107
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-decls.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb index 1f252bd1f..92670c49f 100644 --- a/src/synth/synth-decls.adb +++ b/src/synth/synth-decls.adb @@ -767,10 +767,12 @@ package body Synth.Decls is Warning_Msg_Synth (+Decl, "%n is never assigned and has no default value", (1 => +Decl)); + Def_Val := Build_Const_X (Get_Build (Syn_Inst), + Get_Width (Gate_Net)); else Warning_Msg_Synth (+Decl, "%n is never assigned", (1 => +Decl)); - Connect (Get_Input (Gate, 0), Def_Val); end if; + Connect (Get_Input (Gate, 0), Def_Val); end if; Free_Wire (Val.W); |