1
0

Fix sign of remainder when dividing by zero

h/t chris
This commit is contained in:
Andrew Waterman 2014-04-18 16:30:25 -07:00
parent 1fa505f9ff
commit 09e2ec1f9e

View File

@ -122,7 +122,7 @@ class MulDiv(mulUnroll: Int = 1, earlyOut: Boolean = false)(implicit conf: Rocke
remainder := remainder(w-1,0) << shift remainder := remainder(w-1,0) << shift
count := shift count := shift
} }
when (count === 0 && !less /* divby0 */) { neg_out := false } when (count === 0 && !less /* divby0 */ && !isHi) { neg_out := false }
} }
when (io.resp.fire() || io.kill) { when (io.resp.fire() || io.kill) {
state := s_ready state := s_ready