aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-expands.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-10 20:36:07 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-10 20:36:07 +0100
commit365d6b03e6045059c2813fe24204ee0b6e571045 (patch)
tree04d23f5d7cc7d3eb0d4bea2ab3409036b31d39a3 /src/synth/netlists-expands.adb
parent556bd7c420a231b02b7159217aec9ae5bbe34e8d (diff)
downloadghdl-365d6b03e6045059c2813fe24204ee0b6e571045.tar.gz
ghdl-365d6b03e6045059c2813fe24204ee0b6e571045.tar.bz2
ghdl-365d6b03e6045059c2813fe24204ee0b6e571045.zip
synth: handle memories in inout variable parameter.
Diffstat (limited to 'src/synth/netlists-expands.adb')
-rw-r--r--src/synth/netlists-expands.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/synth/netlists-expands.adb b/src/synth/netlists-expands.adb
index a7afdda01..37ff24bf7 100644
--- a/src/synth/netlists-expands.adb
+++ b/src/synth/netlists-expands.adb
@@ -151,8 +151,12 @@ package body Netlists.Expands is
Res_Arr (P) := Get_Driver (Inp);
P := P + 1;
- Disconnect (Inp);
- Remove_Instance (Inst1);
+ if not Is_Connected (Get_Output (Inst1, 0)) then
+ -- A memidx can be shared between several insert/extract.
+ -- FIXME: what about memidx ?
+ Disconnect (Inp);
+ Remove_Instance (Inst1);
+ end if;
exit when Inst1 = Inst;
end loop;