use binary-invert rather than == 0 comparison
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 5 Mar 2019 11:21:19 +0000 (11:21 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 5 Mar 2019 11:21:19 +0000 (11:21 +0000)
TLB/src/Cam.py

index 16a7814b4ca8bb1de870b31ba8e3ce807ea0c290..ac0ec273828a827a20e696fb16cb577ae4363b25 100644 (file)
@@ -71,7 +71,7 @@ class Cam():
             with m.If(self.enable):
 
                 # Read Operation
-                with m.If(self.write_enable == 0):
+                with m.If(~self.write_enable):
                     m.d.comb += entry_array[index].command.eq(1)
 
                 # Write Operation