From d1403516711e59fbc3860e51537f329549633d3b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 23 Feb 2019 12:22:10 +0000 Subject: [PATCH] whoops revert decode inside module FPNumIn, causing problems --- src/add/fpbase.py | 7 ++++--- src/add/nmigen_add_experiment.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/add/fpbase.py b/src/add/fpbase.py index 2124849e..961824f0 100644 --- a/src/add/fpbase.py +++ b/src/add/fpbase.py @@ -266,9 +266,9 @@ class FPNumIn(FPNumBase): def elaborate(self, platform): m = FPNumBase.elaborate(self, platform) - m.d.comb += self.latch_in.eq(self.op.ack & self.op.stb) - with m.If(self.latch_in): - m.d.sync += self.decode(self.v) + #m.d.comb += self.latch_in.eq(self.op.ack & self.op.stb) + #with m.If(self.latch_in): + # m.d.sync += self.decode(self.v) return m @@ -379,6 +379,7 @@ class FPBase: m.next = next_state m.d.sync += [ # op is latched in from FPNumIn class on same ack/stb + v.decode(op.v), op.ack.eq(0) ] with m.Else(): diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 284cbd98..f7a1d912 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -304,13 +304,13 @@ class FPADD: #geta.set_inputs({"in_a": self.in_a}) #geta.set_outputs({"a": a}) a = geta.a - m.d.comb += a.v.eq(self.in_a.v) # links in_a to a + # XXX m.d.comb += a.v.eq(self.in_a.v) # links in_a to a m.submodules.fpnum_a = a getb = self.add_state(FPGetOpB("get_b")) getb.set_inputs({"in_b": self.in_b}) getb.set_outputs({"b": b}) - m.d.comb += b.v.eq(self.in_b.v) # links in_b to b + # XXX m.d.comb += b.v.eq(self.in_b.v) # links in_b to b sc = self.add_state(FPAddSpecialCases("special_cases")) sc.set_inputs({"a": a, "b": b}) -- 2.30.2