aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-memories.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/netlists-memories.adb')
-rw-r--r--src/synth/netlists-memories.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/synth/netlists-memories.adb b/src/synth/netlists-memories.adb
index 55bcf0ba4..ffc3316ba 100644
--- a/src/synth/netlists-memories.adb
+++ b/src/synth/netlists-memories.adb
@@ -243,6 +243,11 @@ package body Netlists.Memories is
end if;
Res := Res + 1;
N := Get_Input_Net (Inst, 0);
+ when Id_Const_X =>
+ -- For a null wire.
+ pragma Assert (Res = 0);
+ pragma Assert (Get_Width (N) = 0);
+ return 0;
when others =>
raise Internal_Error;
end case;
@@ -1414,14 +1419,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 +1429,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;