From 36c1decbfbff4bf82266ce7a7c4f6b9eb253d5ae Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Mon, 10 Feb 2020 09:45:49 -0500 Subject: [PATCH] Minor cleanup --- src/ieee754/part/partsig.py | 4 ++-- src/ieee754/part/test/test_partsig.py | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) 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)) -- 2.30.2