fhdl: support negation operator

This commit is contained in:
Sebastien Bourdeauducq 2011-12-08 21:15:44 +01:00
parent bf021efa2b
commit 84eb964adc
1 changed files with 3 additions and 0 deletions

View File

@ -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):