From 41ef74f3856b78158448d06d4ffc56623a09a2bb Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 28 Apr 2022 23:05:08 -0700 Subject: [PATCH] add comment --- src/soc/fu/div/experiment/goldschmidt_div_sqrt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/soc/fu/div/experiment/goldschmidt_div_sqrt.py b/src/soc/fu/div/experiment/goldschmidt_div_sqrt.py index 1f3f81a4..62a82706 100644 --- a/src/soc/fu/div/experiment/goldschmidt_div_sqrt.py +++ b/src/soc/fu/div/experiment/goldschmidt_div_sqrt.py @@ -1100,6 +1100,7 @@ class GoldschmidtDivOp(enum.Enum): d_times_f = Signal.like(state.d * state.f) m.d.comb += [ d_times_f.eq(state.d * state.f), + # round the multiplication up d.eq((d_times_f >> params.expanded_width) + (d_times_f[:params.expanded_width] != 0)), ] -- 2.30.2