-
Notifications
You must be signed in to change notification settings - Fork 32
fix(Hint): fix inaccurate l2hint in both single-slice and multi-slice contexts #465
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
base: master
Are you sure you want to change the base?
Conversation
| 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 | ||
| ) | ||
| } |
There was a problem hiding this comment.
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.
| val allCanFire = ( | ||
| RegNextN(!hintChosenVec.map(_.valid).reduce(_ || _), sliceAhead) && | ||
| RegNextN(!hintChosenVec.map(h => h.valid && h.bits.hasData).reduce(_ || _), sliceAhead + 1)) || | ||
| Cat(releaseSourceD).orR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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(_ || _) |
There was a problem hiding this comment.
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 cancelable = Bool() | ||
| // cancelIdx = UInt(2.W) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| // 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) | ||
| // } | ||
|
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary import.
This fix resolves the inaccurate L2 hint through two changes: