off-by-one in slices
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 14 Feb 2019 08:56:39 +0000 (08:56 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 14 Feb 2019 08:56:39 +0000 (08:56 +0000)
src/add/nmigen_add_experiment.py

index c197d735ed531d73a1671a9d2ecedd8cc1daa4cb..991335c915a55a980c13a4e9529b35e8cd3ff717 100644 (file)
@@ -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])