Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bench #583

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/cases/blastoise/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"codegen.vasubu_vv": 92300,
"codegen.vasubu_vx": 300458,
"codegen.vcompress_vm": 19981,
"codegen.vcpop_m": 1691,
"codegen.vcpop_m": 1661,
"codegen.vdiv_vv": 32739,
"codegen.vdiv_vx": 225056,
"codegen.vdivu_vv": 32835,
Expand Down Expand Up @@ -499,4 +499,4 @@
"codegen.vfredusum_vs": 99859,
"codegen.vfredmax_vs": 99859,
"codegen.vfredmin_vs": 99859
}
}
4 changes: 2 additions & 2 deletions .github/cases/machamp/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"codegen.vasubu_vv": 112654,
"codegen.vasubu_vx": 334220,
"codegen.vcompress_vm": 31353,
"codegen.vcpop_m": 1967,
"codegen.vcpop_m": 1943,
"codegen.vdiv_vv": 38992,
"codegen.vdiv_vx": 236842,
"codegen.vdivu_vv": 39002,
Expand Down Expand Up @@ -435,4 +435,4 @@
"codegen.vxor_vx": 83889,
"codegen.vzext_vf2": 40007,
"codegen.vzext_vf4": 6592
}
}
4 changes: 2 additions & 2 deletions .github/cases/sandslash/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"codegen.vasubu_vv": 278200,
"codegen.vasubu_vx": 2090344,
"codegen.vcompress_vm": 136872,
"codegen.vcpop_m": 4955,
"codegen.vcpop_m": 4931,
"codegen.vdiv_vv": 193913,
"codegen.vdiv_vx": 727252,
"codegen.vdivu_vv": 193676,
Expand Down Expand Up @@ -435,4 +435,4 @@
"codegen.vxor_vx": 523387,
"codegen.vzext_vf2": 167243,
"codegen.vzext_vf4": 26777
}
}
2 changes: 1 addition & 1 deletion t1/src/LaneFFO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LaneFFO(datapathWidth: Int) extends Module {
@public
val maskType: Bool = IO(Input(Bool()))

val truthMask: UInt = Mux(maskType, src.head, -1.S(datapathWidth.W).asUInt)
val truthMask: UInt = Mux(maskType, src.head, -1.S(datapathWidth.W).asUInt) & src(3)
val srcData: UInt = truthMask & src(1)
val notZero: Bool = srcData.orR
val lo: UInt = scanLeftOr(srcData)
Expand Down
6 changes: 4 additions & 2 deletions t1/src/T1.scala
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ class T1(val parameter: T1Parameter) extends Module with SerializableModule[T1Pa
completedVec.foreach(_ := false.B)
WARRedResult.valid := false.B
unOrderTypeInstruction := unOrderType
dataResult := 0.U.asTypeOf(dataResult)
}.elsewhen(control.state.wLast && maskUnitIdle) {
// 如果真需要执行的lane会wScheduler,不会提前发出last确认
when(!mixedUnit) {
Expand Down Expand Up @@ -806,7 +807,7 @@ class T1(val parameter: T1Parameter) extends Module with SerializableModule[T1Pa
csrRegForMaskUnit.vl > csrRegForMaskUnit.vStart
mvToVRF.foreach(d => when(requestRegDequeue.fire){d := writeMv})
// 读后写中的读
val needWAR = maskTypeInstruction || border || (reduce && !popCount) || readMv
val needWAR = (maskTypeInstruction || border || reduce || readMv) && !popCount
val skipLaneData: Bool = decodeResultReg(Decoder.mv)
mixedUnit := writeMv || readMv
maskReadLaneSelect.head := UIntToOH(writeBackCounter)
Expand Down Expand Up @@ -1240,8 +1241,9 @@ class T1(val parameter: T1Parameter) extends Module with SerializableModule[T1Pa
decodeResultReg(Decoder.maskDestination) ||
decodeResultReg(Decoder.ffo)
// How many data path(32 bit) will used by maskDestination instruction.
val maskDestinationByteSize: Bits = csrRegForMaskUnit.vl(log2Ceil(parameter.dLen) - 1, 0) << csrRegForMaskUnit.vSew
val maskDestinationUseDataPathSize =
(csrRegForMaskUnit.vl(log2Ceil(parameter.dLen) - 1, 0) << csrRegForMaskUnit.vSew >> 2).asUInt
(maskDestinationByteSize >> 2).asUInt + maskDestinationByteSize(1, 0).orR
val lastGroupCountForThisGroup: UInt = maskDestinationUseDataPathSize(log2Ceil(parameter.laneNumber) - 1, 0)
val counterForMaskDestination: UInt = if(parameter.laneNumber > 1) {
(lastGroupCountForThisGroup - 1.U) |
Expand Down
5 changes: 4 additions & 1 deletion t1/src/laneStage/LaneExecutionBridge.scala
Original file line number Diff line number Diff line change
Expand Up @@ -541,5 +541,8 @@ class LaneExecutionBridge(parameter: LaneParameter, isLastSlot: Boolean, slotInd
recordNotExecute)) || reduceLastResponse
assert(!queue.io.enq.valid || queue.io.enq.ready)
dequeue <> queue.io.deq
updateMaskResult.foreach(_ := !recordQueue.io.deq.bits.sSendResponse.get && queue.io.enq.fire)
updateMaskResult.foreach(_ :=
(!recordQueue.io.deq.bits.sSendResponse.get && queue.io.enq.fire) ||
(enqueue.fire && enqueue.bits.groupCounter === 0.U)
)
}
Loading