From 86a35becd584aaa8d09ce1e677c363dd66a40774 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 2 Jul 2019 19:02:12 +0200 Subject: synth-decls: handle initial value for variables and --- src/synth/synth-decls.adb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/synth') diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb index 0166a07b8..a4668cf70 100644 --- a/src/synth/synth-decls.adb +++ b/src/synth/synth-decls.adb @@ -275,8 +275,8 @@ package body Synth.Decls is begin Make_Object (Syn_Inst, Wire_Variable, Decl); if Is_Valid (Def) then - -- TODO. - raise Internal_Error; + Init := Synth_Expression_With_Type + (Syn_Inst, Def, Get_Type (Decl)); else Init := null; end if; @@ -297,9 +297,8 @@ package body Synth.Decls is begin Make_Object (Syn_Inst, Wire_Signal, Decl); if Is_Valid (Def) then - -- TODO. - raise Internal_Error; - -- Init := Syn_Inst.Sim.Objects (Slot + 1); + Init := Synth_Expression_With_Type + (Syn_Inst, Def, Get_Type (Decl)); else Init := null; end if; -- cgit v1.2.3