From: Michael Nolan Date: Mon, 10 Feb 2020 14:45:49 +0000 (-0500) Subject: Minor cleanup X-Git-Tag: ls180-24jan2020~206 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36c1decbfbff4bf82266ce7a7c4f6b9eb253d5ae;p=ieee754fpu.git Minor cleanup --- diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 833451db..3fb42d8d 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -135,10 +135,10 @@ class PartitionedSignal: return result def __sub__(self, other): - result, _ = self.sub_op(self, other) # TODO, subop + result, _ = self.sub_op(self, other) return result def __rsub__(self, other): - result, _ = self.sub_op(other, self) # TODO, subop + result, _ = self.sub_op(other, self) return result def __mul__(self, other): diff --git a/src/ieee754/part/test/test_partsig.py b/src/ieee754/part/test/test_partsig.py index cc881be3..71138558 100644 --- a/src/ieee754/part/test/test_partsig.py +++ b/src/ieee754/part/test/test_partsig.py @@ -66,12 +66,10 @@ class TestAddMod(Elaboratable): self.carry_in) m.d.comb += self.add_output.eq(add_out) m.d.comb += self.add_carry_out.eq(add_carry) - if hasattr(self.a, "sub_op"): # TODO, remove this - # sub - sub_out, sub_carry = self.a.sub_op(self.a, self.b, - self.carry_in) - m.d.comb += self.sub_output.eq(sub_out) - m.d.comb += self.sub_carry_out.eq(add_carry) + sub_out, sub_carry = self.a.sub_op(self.a, self.b, + self.carry_in) + m.d.comb += self.sub_output.eq(sub_out) + m.d.comb += self.sub_carry_out.eq(add_carry) m.d.comb += self.neg_output.eq(-self.a) ppts = self.partpoints m.d.comb += self.mux_out.eq(PMux(m, ppts, self.mux_sel, self.a, self.b))