From 84eb964adcab11a4d740a5cf7e507e258109d7aa Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 8 Dec 2011 21:15:44 +0100 Subject: [PATCH] fhdl: support negation operator --- migen/fhdl/structure.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 802e1cd2d..6097c2433 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):