From 365d6b03e6045059c2813fe24204ee0b6e571045 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 10 Mar 2020 20:36:07 +0100 Subject: synth: handle memories in inout variable parameter. --- src/synth/netlists-expands.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/synth/netlists-expands.adb') 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; -- cgit v1.2.3