aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-disp_vhdl.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-11-28 18:14:34 +0100
committerTristan Gingold <tgingold@free.fr>2021-11-28 18:14:34 +0100
commitc7d32abe6f8108c0e7af6eea5d546be2bd83b704 (patch)
tree84a4983642cc21347c50a995605ab341b943b221 /src/synth/netlists-disp_vhdl.adb
parent41600195196e67db0de2ea1e6b5ccbf792d97bfa (diff)
downloadghdl-c7d32abe6f8108c0e7af6eea5d546be2bd83b704.tar.gz
ghdl-c7d32abe6f8108c0e7af6eea5d546be2bd83b704.tar.bz2
ghdl-c7d32abe6f8108c0e7af6eea5d546be2bd83b704.zip
synth memories: also accept constant signal as memory initial value
Diffstat (limited to 'src/synth/netlists-disp_vhdl.adb')
-rw-r--r--src/synth/netlists-disp_vhdl.adb11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb
index 580eec452..0b2eb9110 100644
--- a/src/synth/netlists-disp_vhdl.adb
+++ b/src/synth/netlists-disp_vhdl.adb
@@ -766,9 +766,14 @@ package body Netlists.Disp_Vhdl is
begin
Val := Get_Input_Net (Mem, 1);
Val_Inst := Get_Net_Parent (Val);
- if Get_Id (Val_Inst) = Id_Isignal then
- Val := Get_Input_Net (Val_Inst, 1);
- end if;
+ case Get_Id (Val_Inst) is
+ when Id_Isignal =>
+ Val := Get_Input_Net (Val_Inst, 1);
+ when Id_Signal =>
+ Val := Get_Input_Net (Val_Inst, 0);
+ when others =>
+ null;
+ end case;
Put (" :=");
Disp_Memory_Init (Val, Data_W, Depth);
end;