From 82581d8eb3b76543f96fbfc3354ab256b3de54ee Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 5 Dec 2019 22:34:24 +0100 Subject: netlists-disp_vhdl: handle more ROMs. --- src/synth/netlists-disp_vhdl.adb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb index e053716d9..763a08f29 100644 --- a/src/synth/netlists-disp_vhdl.adb +++ b/src/synth/netlists-disp_vhdl.adb @@ -655,8 +655,18 @@ package body Netlists.Disp_Vhdl is Mem, (0 => Data_W - 1)); Disp_Template (" variable \o0 : \o0_type", Mem); if Get_Id (Mem) = Id_Memory_Init then - Put_Line (" :="); - Disp_Memory_Init (Get_Input_Net (Mem, 0), Data_W, Depth); + declare + Val : Net; + Val_Inst : Instance; + begin + Val := Get_Input_Net (Mem, 0); + Val_Inst := Get_Net_Parent (Val); + if Get_Id (Val_Inst) = Id_Isignal then + Val := Get_Input_Net (Val_Inst, 1); + end if; + Put_Line (" :="); + Disp_Memory_Init (Val, Data_W, Depth); + end; else Put_Line (";"); end if; -- cgit v1.2.3