From: Luke Kenneth Casson Leighton Date: Thu, 14 Feb 2019 08:56:39 +0000 (+0000) Subject: off-by-one in slices X-Git-Tag: ls180-24jan2020~2018^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d03803dd8fa042b2aa5d5cf412f8ae41c9ae261;p=ieee754fpu.git off-by-one in slices --- 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])