From: Luke Kenneth Casson Leighton Date: Sat, 22 Feb 2020 17:13:26 +0000 (+0000) Subject: must declare carry equal to width of partitions+1 X-Git-Tag: ls180-24jan2020~129 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fcbae7c6021e33bd39efd88bac76aa5df79cabc8;p=ieee754fpu.git must declare carry equal to width of partitions+1 --- 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