From: Luke Kenneth Casson Leighton Date: Mon, 28 Dec 2020 13:34:49 +0000 (+0000) Subject: partsig: redirect bool to any for now, and use a == Const(-1) for any X-Git-Tag: ls180-24jan2020~32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc37b3eed710bc3d8877b6170dcb0d6da183eea2;p=ieee754fpu.git partsig: redirect bool to any for now, and use a == Const(-1) for any --- diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 728764e7..df2fee09 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -274,8 +274,8 @@ class PartitionedSignal: Value, out ``1`` if any bits are set, ``0`` otherwise. """ - raise NotImplementedError - return Operator("b", [self]) + return self.any() # have to see how this goes + #return Operator("b", [self]) def any(self): """Check if any bits are ``1``. @@ -285,7 +285,6 @@ class PartitionedSignal: Value, out ``1`` if any bits are set, ``0`` otherwise. """ - raise NotImplementedError return Operator("r|", [self]) def all(self): @@ -296,8 +295,7 @@ class PartitionedSignal: Value, out ``1`` if all bits are set, ``0`` otherwise. """ - raise NotImplementedError - return Operator("r&", [self]) + return self == Const(-1) # leverage the __eq__ operator here def xor(self): """Compute pairwise exclusive-or of every bit.