From 2d32e7823fa8f69b3c3e64d5c5245c902afe433d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 16 Jan 2021 18:40:50 +0000 Subject: [PATCH] add partitioned signal any() operator --- src/ieee754/part/partsig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 53561d4b..ed221d3e 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -281,6 +281,7 @@ class PartitionedSignal: Value, out ``1`` if any bits are set, ``0`` otherwise. """ + return self != Const(0) # leverage the __ne__ operator here return Operator("r|", [self]) def all(self): -- 2.30.2