fhdl/tools/value_bits_sign: support not
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 18 Mar 2013 08:52:43 +0000 (09:52 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 18 Mar 2013 08:52:43 +0000 (09:52 +0100)
migen/fhdl/tools.py

index 1dd1ba57ea4a99c4ef782801d072bf63f8cfe54d..07e06b87f6f8cd6411f30b28d8cb8776cef0420b 100644 (file)
@@ -152,6 +152,8 @@ def value_bits_sign(v):
                elif v.op == "<" or v.op == "<=" or v.op == "==" or v.op == "!=" \
                  or v.op == ">" or v.op == ">=":
                          return 1, False
+               elif v.op == "~":
+                       return obs[0]
                else:
                        raise TypeError
        elif isinstance(v, _Slice):