From c6ff96cb67935a59fe78f692974cfa5870b5f1d3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 28 Aug 2021 10:17:22 +0200 Subject: synth-vhdl_decls.adb: add comments --- src/synth/synth-vhdl_decls.adb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; -- cgit v1.2.3