From: Sebastien Bourdeauducq Date: Mon, 2 Dec 2013 16:56:03 +0000 (+0100) Subject: genlib/divider: fix diff computation X-Git-Tag: 24jan2021_ls180~2099^2~407 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae6b78faeb9fe45bcafe6be1133d7b6fbf75c9ed;p=litex.git genlib/divider: fix diff computation --- diff --git a/migen/genlib/divider.py b/migen/genlib/divider.py index 05459332..7f50a079 100644 --- a/migen/genlib/divider.py +++ b/migen/genlib/divider.py @@ -20,7 +20,7 @@ class Divider(Module): self.quotient_o.eq(qr[:w]), self.remainder_o.eq(qr[w:]), self.ready_o.eq(counter == 0), - diff.eq(self.remainder_o - divisor_r) + diff.eq(qr[w-1:] - divisor_r) ] self.sync += [ If(self.start_i,