From ae6b78faeb9fe45bcafe6be1133d7b6fbf75c9ed Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 2 Dec 2013 17:56:03 +0100 Subject: [PATCH] genlib/divider: fix diff computation --- migen/genlib/divider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.30.2