back.pysim: fix implicit boolean conversion.
authorwhitequark <whitequark@whitequark.org>
Fri, 14 Dec 2018 19:08:06 +0000 (19:08 +0000)
committerwhitequark <whitequark@whitequark.org>
Fri, 14 Dec 2018 19:08:06 +0000 (19:08 +0000)
nmigen/back/pysim.py

index 47d84fae640ec8000256a81856cd7c5276da5559..db4a678fedb6961b2cb452d1f9ea9a49abfb9507 100644 (file)
@@ -53,7 +53,7 @@ class _RHSValueCompiler(ValueTransformer):
         return lambda state: value.value
 
     def on_Signal(self, value):
-        if self.sensitivity:
+        if self.sensitivity is not None:
             self.sensitivity.add(value)
         if self.signal_mode == "curr":
             return lambda state: state.curr[value]