From cc37b3eed710bc3d8877b6170dcb0d6da183eea2 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 28 Dec 2020 13:34:49 +0000 Subject: [PATCH] partsig: redirect bool to any for now, and use a == Const(-1) for any --- src/ieee754/part/partsig.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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. -- 2.30.2