hdl.ast: make Value.__abs__ return unsigned shape.
This commit is contained in:
parent
51391be1ae
commit
b1cce87630
2 changed files with 12 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ class Value(metaclass=ABCMeta):
|
|||
|
||||
def __abs__(self):
|
||||
if self.shape().signed:
|
||||
return Mux(self >= 0, self, -self)
|
||||
return Mux(self >= 0, self, -self)[:len(self)]
|
||||
else:
|
||||
return self
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue