From a119874f79c2f8b03ea8446d6adf9d250ef7bf1e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 2 Oct 2021 19:02:36 +0100 Subject: [PATCH] add TODO comments https://bugs.libre-soc.org/show_bug.cgi?id=718 --- src/ieee754/part/partsig.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 5ed299b9..c9002171 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -162,6 +162,10 @@ class PartitionedSignal(UserValue): scalar = False op2 = getsig(op2) pa = PartitionedDynamicShift(len(op1), self.partpoints) + # else: + # TODO: case where the *shifter* is a PartitionedSignal but + # the thing *being* Shifted is a scalar (Signal, expression) + # https://bugs.libre-soc.org/show_bug.cgi?id=718 setattr(self.m.submodules, self.get_modname('ls'), pa) comb = self.m.d.comb if scalar: @@ -172,7 +176,7 @@ class PartitionedSignal(UserValue): comb += pa.a.eq(op1) comb += pa.b.eq(op2) comb += pa.shift_right.eq(shr_flag) - # XXX TODO: carry-in, carry-out + # XXX TODO: carry-in, carry-out (for arithmetic shift) #comb += pa.carry_in.eq(carry) return (pa.output, 0) @@ -182,6 +186,7 @@ class PartitionedSignal(UserValue): return result def __rlshift__(self, other): + # https://bugs.libre-soc.org/show_bug.cgi?id=718 raise NotImplementedError return Operator("<<", [other, self]) @@ -191,6 +196,7 @@ class PartitionedSignal(UserValue): return result def __rrshift__(self, other): + # https://bugs.libre-soc.org/show_bug.cgi?id=718 raise NotImplementedError return Operator(">>", [other, self]) @@ -225,6 +231,7 @@ class PartitionedSignal(UserValue): return result def __radd__(self, other): + # https://bugs.libre-soc.org/show_bug.cgi?id=718 result, _ = self.add_op(other, self) return result @@ -233,6 +240,7 @@ class PartitionedSignal(UserValue): return result def __rsub__(self, other): + # https://bugs.libre-soc.org/show_bug.cgi?id=718 result, _ = self.sub_op(other, self) return result -- 2.30.2