diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-11 14:57:04 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-11 15:02:49 +0200 |
commit | ea07fa6b5d540796e6cf4bedcc208b204ef359a6 (patch) | |
tree | 0d32f519d392345d4b053c80cdeb1e90825b63c4 /src | |
parent | 61fcaafdd2005cde56c7336002bbab860af0f677 (diff) | |
download | ghdl-ea07fa6b5d540796e6cf4bedcc208b204ef359a6.tar.gz ghdl-ea07fa6b5d540796e6cf4bedcc208b204ef359a6.tar.bz2 ghdl-ea07fa6b5d540796e6cf4bedcc208b204ef359a6.zip |
netlists-memories: handle negation for In_Conjunction. Fix #2086
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-memories.adb | 11 |
1 files 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; |