Skip to content

Commit

Permalink
[rtl] fix mask select in mask unit.
Browse files Browse the repository at this point in the history
  • Loading branch information
qinjun-li authored and sequencer committed Nov 20, 2024
1 parent 97ae813 commit 056a50d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions t1/src/mask/MaskUnit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class MaskUnit(parameter: T1Parameter) extends Module {
val slideAddressGen: SlideIndexGen = Module(new SlideIndexGen(parameter))
slideAddressGen.newInstruction := instReq.valid & instReq.bits.vl.orR
slideAddressGen.instructionReq := instReg
slideAddressGen.slideMaskInput := cutUInt(v0.asUInt, 8)(slideAddressGen.slideGroupOut)
slideAddressGen.slideMaskInput := cutUInt(v0.asUInt, parameter.laneNumber)(slideAddressGen.slideGroupOut)

val firstRequest: Bool = RegInit(false.B)
val viotaCounterAdd: Bool = Wire(Bool())
Expand Down Expand Up @@ -519,10 +519,7 @@ class MaskUnit(parameter: T1Parameter) extends Module {
) & Fill(parameter.laneNumber, validExecuteGroup)

// handle mask
val readMaskSelect: UInt =
(executeGroup >> log2Ceil(parameter.datapathWidth / parameter.laneNumber)).asUInt
val readMaskInput: UInt = cutUInt(v0.asUInt, parameter.maskGroupWidth)(readMaskSelect)
val selectReadStageMask: UInt = cutUIntBySize(readMaskInput, 4)(executeGroup(1, 0))
val selectReadStageMask: UInt = cutUInt(v0.asUInt, parameter.laneNumber)(executeGroup)
val readMaskCorrection: UInt =
Mux(instReg.maskType, selectReadStageMask, -1.S(parameter.laneNumber.W).asUInt) &
vlBoundaryCorrection
Expand Down

0 comments on commit 056a50d

Please sign in to comment.