Fix sign of remainder when dividing by zero
h/t chris
This commit is contained in:
parent
1fa505f9ff
commit
09e2ec1f9e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user