From fcbae7c6021e33bd39efd88bac76aa5df79cabc8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 22 Feb 2020 17:13:26 +0000 Subject: [PATCH] must declare carry equal to width of partitions+1 --- src/ieee754/part/partsig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index ea1fa3a6..33cc5fea 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -64,7 +64,7 @@ class PartitionedSignal: # unary ops that require partitioning def __neg__(self): - z = Const(0, self.sig.shape()) + z = Const(0, len(self.partpoints)+1) result, _ = self.add_op(self, ~0, carry=z) # TODO, subop return result @@ -117,7 +117,7 @@ class PartitionedSignal: return (pa.output, 0) def __lshift__(self, other): - z = Const(0, self.sig.shape()) + z = Const(0, len(self.partpoints)+1) result, _ = self.ls_op(self, other, carry=z) # TODO, carry return result -- 2.30.2