From: Luke Kenneth Casson Leighton Date: Thu, 14 Feb 2019 09:05:21 +0000 (+0000) Subject: add in comments on add 2nd stage X-Git-Tag: ls180-24jan2020~2018^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4884f6fae51c126c07eb49300b61ea0ef8fec15d;p=ieee754fpu.git add in comments on add 2nd stage --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 991335c9..fc06092c 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -232,9 +232,12 @@ class FPADD: z_s.eq(b_s) ] + # ****** + # Second stage of add: preparation for normalisation + with m.State("add_1"): m.next = "normalise_1" - + # tot[27] gets set when the sum overflows. shift result down with m.If(tot[27]): m.d.sync += [ z_m.eq(tot[4:28]), @@ -243,7 +246,7 @@ class FPADD: sticky.eq(tot[1] | tot[0]), z_e.eq(z_e + 1) ] - + # tot[27] zero case with m.Else(): m.d.sync += [ z_m.eq(tot[3:27]),