comment for a + -a special case add
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 19 Feb 2019 05:39:14 +0000 (05:39 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 19 Feb 2019 05:39:14 +0000 (05:39 +0000)
src/add/nmigen_add_experiment.py

index 7d9ccb71ef4987d652723c3445b5791161118382..38cd8d78658d2f2af1a2b6c26364a11e55b8fdda 100644 (file)
@@ -88,6 +88,7 @@ class FPADD(FPBase):
                     m.next = "put_z"
                     m.d.sync += z.create(a.s, a.e, a.m[3:-1])
 
+                # if a equal to -b return zero (+ve zero)
                 with m.Elif((a.s != b.s) & (a.m == b.m) & (a.e == b.e)):
                     m.next = "put_z"
                     m.d.sync += z.zero(0)