Skip to content

Commit

Permalink
Fix store whole register (#2479)
Browse files Browse the repository at this point in the history
* UopQueue: fix nfields calculation overflow

* VSUopQueue: fix isLastelem of store whole register
  • Loading branch information
weidingliu authored and huxuan0307 committed Nov 20, 2023
1 parent 4956915 commit 8921891
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/mem/vector/VLUopQueue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class VlUopQueue(implicit p: Parameters) extends VLSUModule
x.stride := io.loadRegIn.bits.src_stride
x.flow_counter := flows
x.flowNum := flows
x.nfields := nf + 1.U
x.nfields := nf +& 1.U
x.vm := vm
x.usWholeReg := isUnitStride(mop) && us_whole_reg(fuOpType)
x.usMaskReg := isUnitStride(mop) && us_mask(fuOpType)
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/xiangshan/mem/vector/VSUopQueue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class VsUopQueue(implicit p: Parameters) extends VLSUModule {
x.stride := io.storeIn.bits.src_stride
x.flow_counter := flows
x.flowNum := flows
x.nfields := nf + 1.U
x.nfields := nf +& 1.U
x.vm := vm
x.usWholeReg := isUnitStride(mop) && us_whole_reg(fuOpType)
x.usMaskReg := isUnitStride(mop) && us_mask(fuOpType)
Expand Down Expand Up @@ -320,7 +320,7 @@ class VsUopQueue(implicit p: Parameters) extends VLSUModule {
alignedType = issueAlignedType
)
x.uopQueuePtr := flowSplitPtr
x.isLastElem := (elemIdx +& 1.U) === (issueNFIELDS << issueVLMAXLog2)
x.isLastElem := (elemIdx +& 1.U) === Mux(issueEntry.usWholeReg, (issueNFIELDS << log2Up(VLENB)),(issueNFIELDS << issueVLMAXLog2))
}
}

Expand Down

0 comments on commit 8921891

Please sign in to comment.