From e91061a2bb6ce6cfcf52094b778a0ec6cb20b791 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 28 Mar 2019 15:51:47 +0000 Subject: [PATCH] solve sync/comb issue with using state-machine or pipeline in FPNormToPack --- src/add/nmigen_add_experiment.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 16163e07..7646cc4e 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -1249,14 +1249,13 @@ class FPNormToPack(FPState, UnbufferedPipeline): chain.setup(m, i) self.out_z = pmod.ospec() - # XXX TODO: sync for state-based - m.d.comb += self.out_z.mid.eq(pmod.o.mid) - m.d.comb += self.out_z.z.eq(pmod.o.z) # outputs packed result + self.o = pmod.o def process(self, i): - return self.out_z + return self.o def action(self, m): + m.d.sync += self.out_z.eq(self.process(None)) m.next = "pack_put_z" -- 2.30.2