aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-03 20:24:23 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-03 21:15:08 +0100
commit63f06845f2ba7aa339a235aaf98b6e089fe5901f (patch)
tree7365273fb02cc0d318d8f6283672605636339d68
parent819514b98f5567830cfd3556d2042a3e4b974f4e (diff)
downloadghdl-63f06845f2ba7aa339a235aaf98b6e089fe5901f.tar.gz
ghdl-63f06845f2ba7aa339a235aaf98b6e089fe5901f.tar.bz2
ghdl-63f06845f2ba7aa339a235aaf98b6e089fe5901f.zip
synth: fix multiport read memories (for issue #1000)
-rw-r--r--src/synth/netlists-memories.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb
index 4163e4878..866427cf9 100644
--- a/src/synth/netlists-memories.adb
+++ b/src/synth/netlists-memories.adb
@@ -428,6 +428,7 @@ package body Netlists.Memories is
-- Convert readers.
declare
Inp : Input;
+ Next_Inp : Input;
Extr_Inst : Instance;
Addr_Inp : Input;
Addr : Net;
@@ -437,6 +438,7 @@ package body Netlists.Memories is
begin
Inp := Get_First_Sink (Orig_Net);
while Inp /= No_Input loop
+ Next_Inp := Get_Next_Sink (Inp);
Extr_Inst := Get_Input_Parent (Inp);
case Get_Id (Extr_Inst) is
when Id_Memory_Init =>
@@ -468,7 +470,7 @@ package body Netlists.Memories is
when others =>
raise Internal_Error;
end case;
- Inp := Get_Next_Sink (Inp);
+ Inp := Next_Inp;
end loop;
end;
end Replace_Read_Ports;