Skip to content

Commit

Permalink
[rtl] vrf report ready need free record.
Browse files Browse the repository at this point in the history
  • Loading branch information
qinjun-li authored and Avimitin committed Jan 25, 2024
1 parent a53a7e5 commit e5ad358
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion t1/src/Lane.scala
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,13 @@ class Lane(val parameter: LaneParameter) extends Module with SerializableModule[


val slotEnqueueFire: Seq[Bool] = Seq.tabulate(parameter.chainingSize) { slotIndex =>
val enqueueReady: Bool = !slotOccupied(slotIndex)
val enqueueReady: Bool = Wire(Bool())
val enqueueValid: Bool = Wire(Bool())
val enqueueFire: Bool = enqueueReady && enqueueValid
// enqueue from lane request
if (slotIndex == parameter.chainingSize - 1) {
enqueueValid := laneRequest.valid
enqueueReady := !slotOccupied(slotIndex) && vrf.instructionWriteReport.ready
when(enqueueFire) {
slotControl(slotIndex) := entranceControl
maskGroupCountVec(slotIndex) := 0.U(parameter.maskGroupSizeBits.W)
Expand All @@ -974,6 +975,7 @@ class Lane(val parameter: LaneParameter) extends Module with SerializableModule[
} else {
// shifter for slot
enqueueValid := slotCanShift(slotIndex + 1) && slotOccupied(slotIndex + 1)
enqueueReady := !slotOccupied(slotIndex)
when(enqueueFire) {
slotControl(slotIndex) := slotControl(slotIndex + 1)
maskGroupCountVec(slotIndex) := maskGroupCountVec(slotIndex + 1)
Expand Down
3 changes: 1 addition & 2 deletions t1/src/vrf/VRF.scala
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ class VRF(val parameter: VRFParam) extends Module with SerializableModule[VRFPar
val recordFFO: UInt = ffo(freeRecord)
val recordEnq: UInt = Wire(UInt((parameter.chainingSize + 1).W))
// handle VRF hazard
// TODO: move to [[V]]
instructionWriteReport.ready := true.B
instructionWriteReport.ready := freeRecord.orR
recordEnq := Mux(
// 纯粹的lsu指令的记录不需要ready
instructionWriteReport.valid,
Expand Down

0 comments on commit e5ad358

Please sign in to comment.