From 0aea70cc291d6ab896f33d80f2f1892ac1c5dff8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 27 Feb 2019 17:14:17 +0000 Subject: [PATCH] assign tests to signals --- src/add/nmigen_add_experiment.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index e80c149e..1c5c1ea4 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -214,10 +214,14 @@ class FPAddAlignMultiMod(FPState): m.d.comb += self.exp_eq.eq(0) m.d.comb += self.out_a.copy(self.in_a) m.d.comb += self.out_b.copy(self.in_b) - with m.If(self.in_a.e > self.in_b.e): + agtb = Signal(reset_less=True) + altb = Signal(reset_less=True) + m.d.comb += agtb.eq(self.in_a.e > self.in_b.e) + m.d.comb += altb.eq(self.in_a.e < self.in_b.e) + with m.If(agtb): m.d.comb += self.out_b.shift_down(self.in_b) # exponent of b greater than a: shift a down - with m.Elif(self.in_a.e < self.in_b.e): + with m.Elif(altb): m.d.comb += self.out_a.shift_down(self.in_a) # exponents equal: move to next stage. with m.Else(): -- 2.30.2