aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-inference.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-inference.adb')
-rw-r--r--src/synth/synth-inference.adb9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/synth/synth-inference.adb b/src/synth/synth-inference.adb
index 8ff6dc1a6..5017a2726 100644
--- a/src/synth/synth-inference.adb
+++ b/src/synth/synth-inference.adb
@@ -215,7 +215,6 @@ package body Synth.Inference is
Res : Net;
Sig : Instance;
Init : Net;
- Init_Input : Input;
Rst : Net;
Rst_Val : Net;
begin
@@ -238,13 +237,11 @@ package body Synth.Inference is
Data := Build_Mux2 (Ctxt, Enable, Prev_Val, Data);
end if;
- -- If the signal declaration has an initial value, move it
- -- to the dff.
+ -- If the signal declaration has an initial value, get it.
Sig := Get_Parent (Prev_Val);
if Get_Id (Get_Module (Sig)) = Id_Isignal then
- Init_Input := Get_Input (Sig, 1);
- Init := Get_Driver (Init_Input);
- Disconnect (Init_Input);
+ Init := Get_Input_Net (Sig, 1);
+ Init := Build2_Extract (Ctxt, Init, Off, Get_Width (O));
else
Init := No_Net;
end if;