提交 7c8efd4a 编写于 作者: Y Yinan Xu

fu: fix needFlush arguments

上级 9b09132d
...@@ -41,7 +41,7 @@ class Radix2Divider(len: Int) extends AbstractDivider(len) { ...@@ -41,7 +41,7 @@ class Radix2Divider(len: Int) extends AbstractDivider(len) {
val uopReg = RegEnable(uop, newReq) val uopReg = RegEnable(uop, newReq)
val cnt = Counter(len) val cnt = Counter(len)
when (newReq && !io.in.bits.uop.roqIdx.needFlush(io.redirectIn)) { when (newReq && !io.in.bits.uop.roqIdx.needFlush(io.redirectIn, io.flushIn)) {
state := s_log2 state := s_log2
} .elsewhen (state === s_log2) { } .elsewhen (state === s_log2) {
// `canSkipShift` is calculated as following: // `canSkipShift` is calculated as following:
...@@ -87,4 +87,4 @@ class Radix2Divider(len: Int) extends AbstractDivider(len) { ...@@ -87,4 +87,4 @@ class Radix2Divider(len: Int) extends AbstractDivider(len) {
io.out.valid := state === s_finish io.out.valid := state === s_finish
io.in.ready := state === s_idle io.in.ready := state === s_idle
} }
\ No newline at end of file
...@@ -37,7 +37,7 @@ class SRT4Divider(len: Int) extends AbstractDivider(len) { ...@@ -37,7 +37,7 @@ class SRT4Divider(len: Int) extends AbstractDivider(len) {
switch(state){ switch(state){
is(s_idle){ is(s_idle){
when (io.in.fire() && !io.in.bits.uop.roqIdx.needFlush(io.redirectIn)) { when (io.in.fire() && !io.in.bits.uop.roqIdx.needFlush(io.redirectIn, io.flushIn)) {
state := Mux(divZero, s_finish, s_lzd) state := Mux(divZero, s_finish, s_lzd)
} }
} }
......
...@@ -47,7 +47,7 @@ class FDivSqrt extends FPUSubModule { ...@@ -47,7 +47,7 @@ class FDivSqrt extends FPUSubModule {
val src1 = unbox(io.in.bits.src(0), tag, None) val src1 = unbox(io.in.bits.src(0), tag, None)
val src2 = unbox(io.in.bits.src(1), tag, None) val src2 = unbox(io.in.bits.src(1), tag, None)
divSqrt.io.inValid := io.in.fire() && !io.in.bits.uop.roqIdx.needFlush(io.redirectIn) divSqrt.io.inValid := io.in.fire() && !io.in.bits.uop.roqIdx.needFlush(io.redirectIn, io.flushIn)
divSqrt.io.sqrtOp := fpCtrl.sqrt divSqrt.io.sqrtOp := fpCtrl.sqrt
divSqrt.io.a := src1 divSqrt.io.a := src1
divSqrt.io.b := src2 divSqrt.io.b := src2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册