diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-05 22:34:24 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-05 22:34:24 +0100 |
commit | 82581d8eb3b76543f96fbfc3354ab256b3de54ee (patch) | |
tree | 52200411007e99be2b2e220e96f3d1e4857163ad /src | |
parent | 9a95640f3d9f306d477124fb8bb291b30590b353 (diff) | |
download | ghdl-82581d8eb3b76543f96fbfc3354ab256b3de54ee.tar.gz ghdl-82581d8eb3b76543f96fbfc3354ab256b3de54ee.tar.bz2 ghdl-82581d8eb3b76543f96fbfc3354ab256b3de54ee.zip |
netlists-disp_vhdl: handle more ROMs.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-disp_vhdl.adb | 14 |
1 files changed, 12 insertions, 2 deletions
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; |