From: Sebastien Bourdeauducq Date: Thu, 8 Dec 2011 20:15:44 +0000 (+0100) Subject: fhdl: support negation operator X-Git-Tag: 24jan2021_ls180~2099^2~1165 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84eb964adcab11a4d740a5cf7e507e258109d7aa;p=litex.git fhdl: support negation operator --- diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 802e1cd2..6097c243 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -19,6 +19,9 @@ class BV: return r class Value: + def __invert__(self): + return Operator("~", [self]) + def __add__(self, other): return Operator("+", [self, other]) def __radd__(self, other):