From a6e70cb6a24ebff8ca2b6fbc98c64c687523a9bc Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 2 Mar 2019 13:58:45 +0000 Subject: [PATCH] move put_z to PutZ class --- src/add/nmigen_add_experiment.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 14f73052..f6d44509 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -761,7 +761,14 @@ class FPPack(FPState): class FPPutZ(FPState): def action(self, m): - self.put_z(m, self.z, self.out_z, "get_a") + m.d.sync += [ + self.out_z.v.eq(self.z.v) + ] + with m.If(self.out_z.stb & self.out_z.ack): + m.d.sync += self.out_z.stb.eq(0) + m.next = "get_a" + with m.Else(): + m.d.sync += self.out_z.stb.eq(1) class FPADD: -- 2.30.2