fhdl: support negation operator
This commit is contained in:
parent
bf021efa2b
commit
84eb964adc
|
@ -19,6 +19,9 @@ class BV:
|
||||||
return r
|
return r
|
||||||
|
|
||||||
class Value:
|
class Value:
|
||||||
|
def __invert__(self):
|
||||||
|
return Operator("~", [self])
|
||||||
|
|
||||||
def __add__(self, other):
|
def __add__(self, other):
|
||||||
return Operator("+", [self, other])
|
return Operator("+", [self, other])
|
||||||
def __radd__(self, other):
|
def __radd__(self, other):
|
||||||
|
|
Loading…
Reference in New Issue