From: Luke Kenneth Casson Leighton Date: Sat, 16 Jan 2021 18:40:50 +0000 (+0000) Subject: add partitioned signal any() operator X-Git-Tag: ls180-24jan2020~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d32e7823fa8f69b3c3e64d5c5245c902afe433d;p=ieee754fpu.git add partitioned signal any() operator --- 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):