Skip to content

Commit

Permalink
[BACKPORT-0.6][Bugfix][VTA] Fix multiple transfer issue in LoadUop mo…
Browse files Browse the repository at this point in the history
…dule (#5882)

Co-authored-by: Liangfu Chen <[email protected]>
  • Loading branch information
liangfu and liangfu authored Jun 22, 2020
1 parent cd47a34 commit 69367e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vta/hardware/chisel/src/main/scala/core/LoadUop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class LoadUop(debug: Boolean = false)(implicit p: Parameters) extends Module {
}
}
.elsewhen(io.vme_rd.data.fire()) {
when(xcnt === xlen - 1.U) {
when((xcnt === xlen - 1.U) && (xrem === 0.U)) {
wmask := "b_01".U.asTypeOf(wmask)
}.otherwise {
wmask := "b_11".U.asTypeOf(wmask)
Expand All @@ -183,7 +183,7 @@ class LoadUop(debug: Boolean = false)(implicit p: Parameters) extends Module {
when(io.vme_rd.cmd.fire()) {
wmask := "b_10".U.asTypeOf(wmask)
}.elsewhen(io.vme_rd.data.fire()) {
when(sizeIsEven && xcnt === xlen - 1.U) {
when(sizeIsEven && (xcnt === xlen - 1.U) && (xrem === 0.U)) {
wmask := "b_01".U.asTypeOf(wmask)
}.otherwise {
wmask := "b_11".U.asTypeOf(wmask)
Expand Down

0 comments on commit 69367e7

Please sign in to comment.