From 5ee0dbbcec0a4c9c00d59362c5839926c3b933b7 Mon Sep 17 00:00:00 2001 From: Aleksandar Kostovic Date: Wed, 13 Feb 2019 17:20:49 +0100 Subject: [PATCH] Replicated unpack part of always block into nmigen --- src/add/nmigen_add_experiment.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 """ -- 2.30.2