remove working code, shrink "fail" case
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 22 Feb 2020 16:57:53 +0000 (16:57 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 22 Feb 2020 16:57:53 +0000 (16:57 +0000)
experiments2/part_sig_add.py
experiments2/test_partsig.py

index 284fbf7e15c8b8723b2cdb48f6827c5c6e9b17c6..ec7bf3b1cd1797935092757fddfc59a368ff2cfd 100644 (file)
@@ -15,14 +15,6 @@ def test():
                                 module.add_output,
                                 module.ls_output,
                                 module.sub_output,
-                                module.eq_output,
-                                module.gt_output,
-                                module.ge_output,
-                                module.ne_output,
-                                module.lt_output,
-                                module.le_output,
-                                module.mux_sel,
-                                module.mux_out,
                                 module.carry_in,
                                 module.add_carry_out,
                                 module.sub_carry_out,
index 093e59bd1c74fcd97d5dc0188d358e222fdae686..3c868a4d42e29ffac4aaaccc7db985e43ba4ff28 100644 (file)
@@ -16,19 +16,9 @@ class TestAddMod2(Elaboratable):
         self.partpoints = partpoints
         self.a = PartitionedSignal(partpoints, width)
         self.b = PartitionedSignal(partpoints, width)
-        self.bsig = Signal(width)
         self.add_output = Signal(width)
         self.ls_output = Signal(width) # left shift
-        self.ls_scal_output = Signal(width) # left shift
         self.sub_output = Signal(width)
-        self.eq_output = Signal(len(partpoints)+1)
-        self.gt_output = Signal(len(partpoints)+1)
-        self.ge_output = Signal(len(partpoints)+1)
-        self.ne_output = Signal(len(partpoints)+1)
-        self.lt_output = Signal(len(partpoints)+1)
-        self.le_output = Signal(len(partpoints)+1)
-        self.mux_sel = Signal(len(partpoints)+1)
-        self.mux_out = Signal(width)
         self.carry_in = Signal(len(partpoints)+1)
         self.add_carry_out = Signal(len(partpoints)+1)
         self.sub_carry_out = Signal(len(partpoints)+1)
@@ -40,13 +30,6 @@ class TestAddMod2(Elaboratable):
         sync = m.d.sync
         self.a.set_module(m)
         self.b.set_module(m)
-        # compares
-        sync += self.lt_output.eq(self.a < self.b)
-        sync += self.ne_output.eq(self.a != self.b)
-        sync += self.le_output.eq(self.a <= self.b)
-        sync += self.gt_output.eq(self.a > self.b)
-        sync += self.eq_output.eq(self.a == self.b)
-        sync += self.ge_output.eq(self.a >= self.b)
         # add
         add_out, add_carry = self.a.add_op(self.a, self.b,
                                            self.carry_in)
@@ -62,10 +45,6 @@ class TestAddMod2(Elaboratable):
         # left shift
         sync += self.ls_output.eq(self.a << self.b)
         ppts = self.partpoints
-        sync += self.mux_out.eq(PMux(m, ppts, self.mux_sel, self.a, self.b))
-        # scalar left shift
-        comb += self.bsig.eq(self.b.sig)
-        sync += self.ls_scal_output.eq(self.a << self.bsig)
 
         return m