From: Aleksandar Kostovic Date: Wed, 13 Feb 2019 16:20:49 +0000 (+0100) Subject: Replicated unpack part of always block into nmigen X-Git-Tag: ls180-24jan2020~2036 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ee0dbbcec0a4c9c00d59362c5839926c3b933b7;p=ieee754fpu.git Replicated unpack part of always block into nmigen --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 412073b3..3aff0004 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -69,6 +69,17 @@ class FPADD: with m.Else(): m.d.sync += self.in_b_ack.eq(1) + with m.State("unpack"): + m.next = "special_cases" + m.d.sync += [ + a_m.Cat(self.a[22:0], 0), + b_m.Cat(self.b[22:0], 0), + a_e.Cat(self.a[30:23] - 127), + b_e.Cat(self.b[30:23] - 127), + a_s.Cat(self.a[31]), + b_s.Cat(self.b[31]) + ] + return m """