From 0d03803dd8fa042b2aa5d5cf412f8ae41c9ae261 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 14 Feb 2019 08:56:39 +0000 Subject: [PATCH] off-by-one in slices --- src/add/nmigen_add_experiment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index c197d735..991335c9 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -237,7 +237,7 @@ class FPADD: with m.If(tot[27]): m.d.sync += [ - z_m.eq(tot[4:27]), + z_m.eq(tot[4:28]), guard.eq(tot[3]), round_bit.eq(tot[2]), sticky.eq(tot[1] | tot[0]), @@ -246,7 +246,7 @@ class FPADD: with m.Else(): m.d.sync += [ - z_m.eq(tot[3:26]), + z_m.eq(tot[3:27]), guard.eq(tot[2]), round_bit.eq(tot[1]), sticky.eq(tot[0]) -- 2.30.2