fhdl/structure: add unary minus
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 29 Nov 2012 21:52:57 +0000 (22:52 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 29 Nov 2012 21:52:57 +0000 (22:52 +0100)
migen/fhdl/structure.py

index 869ed1287bb0d902dc5669711add802fa3d55e26..250c57ae42db1a146bcc60bb15f284bd8ce4875d 100644 (file)
@@ -37,6 +37,8 @@ class HUID:
 class Value(HUID):
        def __invert__(self):
                return _Operator("~", [self])
+       def __neg__(self):
+               return _Operator("-", [self])
 
        def __add__(self, other):
                return _Operator("+", [self, other])