aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-08-28 10:17:22 +0200
committerTristan Gingold <tgingold@free.fr>2021-08-28 13:22:30 +0200
commitc6ff96cb67935a59fe78f692974cfa5870b5f1d3 (patch)
tree8e0102687aa12eae585bd47d693e468860abda1e /src
parent7f05e691acbf37a5ec8b2cbd30c023368db86505 (diff)
downloadghdl-c6ff96cb67935a59fe78f692974cfa5870b5f1d3.tar.gz
ghdl-c6ff96cb67935a59fe78f692974cfa5870b5f1d3.tar.bz2
ghdl-c6ff96cb67935a59fe78f692974cfa5870b5f1d3.zip
synth-vhdl_decls.adb: add comments
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-vhdl_decls.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb
index 779c802c1..c6ada6dba 100644
--- a/src/synth/synth-vhdl_decls.adb
+++ b/src/synth/synth-vhdl_decls.adb
@@ -1123,6 +1123,7 @@ package body Synth.Vhdl_Decls is
raise Internal_Error;
end case;
if Drv = No_Net then
+ -- Undriven signals.
if Is_Connected (Get_Output (Gate, 0)) then
-- No warning if the signal is not used.
-- TODO: maybe simply remove it.
@@ -1135,9 +1136,12 @@ package body Synth.Vhdl_Decls is
end if;
end if;
if Def_Val = No_Net then
+ -- The initial value of an undriven signal is X.
Def_Val := Build_Const_X (Get_Build (Syn_Inst),
Get_Width (Gate_Net));
end if;
+
+ -- The value of an undriven signal is its initial value.
Connect (Get_Input (Gate, 0), Def_Val);
end if;