Skip to content

Conversation

@Frankslu
Copy link
Contributor

This fix resolves the inaccurate L2 hint through two changes:

  1. Sending all D-channel responses to the CustomL1Hint module.
  2. Arbitrating L2 hints across multiple slices, using a scheme analogous to TLXbar.

Comment on lines +737 to +746
val latch_grant_s4 = true
val pendingD_s4 = if (latch_grant_s4) {
task_s4.bits.fromA && !task_s4.bits.mshrTask && !need_write_releaseBuf_s4 && (
task_s4.bits.opcode === GrantData || task_s4.bits.opcode === AccessAckData || task_s4.bits.opcode === Grant
)
} else {
task_s4.bits.fromA && !task_s4.bits.mshrTask && (
task_s4.bits.opcode === GrantData || task_s4.bits.opcode === AccessAckData
)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to distinguish between the two cases if latch_grant_s4 is a constant value.

Comment on lines +421 to +424
val allCanFire = (
RegNextN(!hintChosenVec.map(_.valid).reduce(_ || _), sliceAhead) &&
RegNextN(!hintChosenVec.map(h => h.valid && h.bits.hasData).reduce(_ || _), sliceAhead + 1)) ||
Cat(releaseSourceD).orR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val allCanFire = (
RegNextN(!hintChosenVec.map(_.valid).reduce(_ || _), sliceAhead) &&
RegNextN(!hintChosenVec.map(h => h.valid && h.bits.hasData).reduce(_ || _), sliceAhead + 1)) ||
Cat(releaseSourceD).orR
val allCanFire = (
RegNextN(!hintChosenVec.map(_.valid).reduce(_ || _), sliceAhead) &&
RegNextN(!hintChosenVec.map(h => h.valid && h.bits.hasData).reduce(_ || _), sliceAhead + 1)
) || Cat(releaseSourceD).orR

// so we relax the restriction on grant selection.
val sliceCanFire = RegNextN(hintFire && i.U === hintChosen, sliceAhead) ||
RegNextN(hintFire && i.U === hintChosen, sliceAhead + 1)
// val chosen = hintChosenVec.map(h => h.valid && h.bits.sliceId === i.U).reduce(_ || _)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment should be removed.

Comment on lines +31 to +32
// val cancelable = Bool()
// cancelIdx = UInt(2.W)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment should be removed.

chn_AccessAckData_s3 -> AccessAckData
)
)
// enqBits_s3.cancelable := false.B
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment should be removed.

Comment on lines +269 to +278
// Don't remove this which can test retry
// val enable_force_retry = true
// val occWayMask_s2 = if(enable_force_retry) {
// val forceRetry = Counter(refillReqValid_s2, 4)
// Mux(forceRetry._1 === 0.U,
// ~0.U(ways.W), RegEnable(occWayMask_s1, io.read.fire && io.read.bits.refill))
// } else {
// RegEnable(occWayMask_s1, io.read.fire && io.read.bits.refill)
// }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment should be removed.

val reqValid_s3 = RegNext(reqValid_s2, false.B)
val req_s2 = RegEnable(io.read.bits, 0.U.asTypeOf(io.read.bits), io.read.fire)
val req_s1 = io.read.bits
val req_s2 = RegEnable(req_s1, 0.U.asTypeOf(req_s1), io.read.fire)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm if req_s2 does not contain control signals. If so, do not initialize it.

import utility.mbist.MbistPipeline
import coupledL2.utils._
import utility.{ParallelPriorityMux, RegNextN, XSPerfAccumulate, Code}
import utility.{ParallelPriorityMux, RegNextN, XSPerfAccumulate, XSPerfHistogram, Code}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants