Minor cleanup
authorMichael Nolan <mtnolan2640@gmail.com>
Mon, 10 Feb 2020 14:45:49 +0000 (09:45 -0500)
committerMichael Nolan <mtnolan2640@gmail.com>
Mon, 10 Feb 2020 14:46:34 +0000 (09:46 -0500)
src/ieee754/part/partsig.py
src/ieee754/part/test/test_partsig.py

index 833451db99721ebf99329739145a3b847727c1ab..3fb42d8da38824c490722156016c4d776469fd12 100644 (file)
@@ -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):
index cc881be307cc44c6030b3f5fce4865413bd0c31b..7113855832e192107fbe780603210e25a7e46bc4 100644 (file)
@@ -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))