From: Aleksandar Kostovic Date: Sat, 16 Feb 2019 11:27:29 +0000 (+0100) Subject: Did get_a state in nmigen X-Git-Tag: ls180-24jan2020~1945 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=495d64c21b1e949b544b1d0eb3f7412e7ab23109;p=ieee754fpu.git Did get_a state in nmigen --- diff --git a/src/add/fmul.py b/src/add/fmul.py index 7abf072a..d8192c6b 100644 --- a/src/add/fmul.py +++ b/src/add/fmul.py @@ -30,8 +30,17 @@ class FPMUL(FPBase): with m.FSM() as fsm: - """ - always @(posedge clk) + with m.State("get_a"): + m.next += "get_b" + m.d.sync += s.in_a.ack.eq(1) + with m.If(s.in_a.ack & in_a.stb): + m.d.sync += [ + a.eq(in_a), + s.in_a.ack(0) + ] + +""" +always @(posedge clk) begin case(state)