aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-12-05 22:34:24 +0100
committerTristan Gingold <tgingold@free.fr>2019-12-05 22:34:24 +0100
commit82581d8eb3b76543f96fbfc3354ab256b3de54ee (patch)
tree52200411007e99be2b2e220e96f3d1e4857163ad
parent9a95640f3d9f306d477124fb8bb291b30590b353 (diff)
downloadghdl-82581d8eb3b76543f96fbfc3354ab256b3de54ee.tar.gz
ghdl-82581d8eb3b76543f96fbfc3354ab256b3de54ee.tar.bz2
ghdl-82581d8eb3b76543f96fbfc3354ab256b3de54ee.zip
netlists-disp_vhdl: handle more ROMs.
-rw-r--r--src/synth/netlists-disp_vhdl.adb14
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;