genlib/divider: fix diff computation

This commit is contained in:
Sebastien Bourdeauducq 2013-12-02 17:56:03 +01:00
parent ad70d056a8
commit ae6b78faeb
1 changed files with 1 additions and 1 deletions

View File

@ -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,