From ea07fa6b5d540796e6cf4bedcc208b204ef359a6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 11 Jun 2022 14:57:04 +0200 Subject: netlists-memories: handle negation for In_Conjunction. Fix #2086 --- src/synth/netlists-memories.adb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb index 55bcf0ba4..2764ec380 100644 --- a/src/synth/netlists-memories.adb +++ b/src/synth/netlists-memories.adb @@ -1414,14 +1414,9 @@ package body Netlists.Memories is Inst : Instance; N : Net; begin - if Negate then - -- TODO. - raise Internal_Error; - end if; - -- Simple case (but important for the memories) if V = Conj then - return True; + return (not Negate); end if; N := Conj; @@ -1429,12 +1424,12 @@ package body Netlists.Memories is loop Inst := Get_Net_Parent (N); if Get_Id (Inst) /= Id_And then - return N = V; + return (N = V) xor Negate; end if; -- Inst is AND2. if Get_Input_Net (Inst, 0) = V then - return True; + return (not Negate); end if; N := Get_Input_Net (Inst, 1); end loop; -- cgit v1.2.3