From 55d143a454d76ba52363757ba41772b9b9c30389 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 29 Nov 2012 22:52:57 +0100 Subject: [PATCH] fhdl/structure: add unary minus --- migen/fhdl/structure.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 869ed128..250c57ae 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -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]) -- 2.30.2