From: Sebastien Bourdeauducq Date: Thu, 29 Nov 2012 21:52:57 +0000 (+0100) Subject: fhdl/structure: add unary minus X-Git-Tag: 24jan2021_ls180~2099^2~735 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=55d143a454d76ba52363757ba41772b9b9c30389;p=litex.git fhdl/structure: add unary minus --- 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])