align RTL: tage window method, block resolveQ if update failed due to bank conflict.#644
align RTL: tage window method, block resolveQ if update failed due to bank conflict.#644jensen-yan merged 3 commits intoxs-devfrom
Conversation
otherwise main BTB may do resolve udpate twice if tage resolveUpdate failed Change-Id: I660cb52b7f70a4202ca7741d8c7ed564fa7cd5b8
WalkthroughImplements a probe-then-apply two‑phase resolve mechanism for predictor updates: components are probed for bank/conflict readiness, updates are applied only if all components can resolve, and repeated probe failures can temporarily block prediction. Changes touch fetch stage, decoupled BPU, BTBTAGE, and base predictor interfaces. Changes
Sequence DiagramsequenceDiagram
participant Fetch as Fetch Stage
participant DBPU as DecoupledBPU
participant TAGE as BTBTAGE
participant Other as Other Predictors
Fetch->>DBPU: resolveUpdate(stream)
activate DBPU
Note over DBPU: Phase 1 — Probe all components
DBPU->>TAGE: canResolveUpdate(stream)
TAGE-->>DBPU: true/false
DBPU->>Other: canResolveUpdate(stream)
Other-->>DBPU: true/false
alt Any probe returned false
DBPU->>DBPU: resolveDequeueFailCounter++
alt Counter >= resolveBlockThreshold
DBPU->>DBPU: blockPredictionOnce()
end
DBPU-->>Fetch: false
Fetch->>DBPU: notifyResolveFailure()
Fetch->>Fetch: keep stream in queue
else All probes true
Note over DBPU: Phase 2 — Apply updates
DBPU->>TAGE: doResolveUpdate(stream)
TAGE-->>DBPU: done
DBPU->>Other: doResolveUpdate(stream)
Other-->>DBPU: done
DBPU-->>Fetch: true
Fetch->>DBPU: notifyResolveSuccess()
Fetch->>Fetch: pop stream from queue
end
deactivate DBPU
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
|
Change-Id: I44f3e6433d110d7625f4fbdb29df0e95d5ab9181
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/cpu/pred/btb/test/btb_tage.test.cc (3)
891-910: Same-bank conflict path correctly exercises canResolveUpdate; optionally tighten invariantsThe new
canResolveUpdate(stream)usage plus the conflict-counter andpredBankValidchecks look consistent with the intended “detect & defer” behavior. If you want this test to guard more strongly against regressions, you could additionally assert that no update-related stats (e.g.,updateAllocSuccess) change in this path, to prove the update was fully skipped rather than partially applied.
913-928: No-conflict path two-phase flow looks good; consider checking post-update state if it mattersUsing
canResolveUpdate(stream)withASSERT_TRUEbeforedoResolveUpdate(stream)cleanly exercises the non-conflict path and confirms the conflict counter stays unchanged. IfdoResolveUpdateis also expected to clear or update any state such aspredBankValidafter a successful resolve, you might add an assertion here to encode that contract in the test.
931-948: Conflict-disabled path is correct; optional: isolate subcases with a fresh predictorWith
enableBankConflict = false, thecanResolveUpdate/doResolveUpdatepair correctly bypasses conflict accounting even for same-bank accesses. Since all three subcases share the samebankTageinstance, consider (optionally) constructing a freshBTBTAGEfor each sub-block or explicitly resetting any relevant state if you ever tighten the implementation semantics; this would make the test more robust to future changes in internal bookkeeping.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/cpu/pred/btb/test/btb_tage.test.cc(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Quick Build, Unit Tests & Smoke Test
- GitHub Check: perf_test / XS-GEM5 - Run performance test (spec06-0.3c)
🚀 Coremark Smoke Test Results
✅ Difftest smoke test passed! |
|
[Generated by GEM5 Performance Robot] Ideal BTB PerformanceOverall Score
|
Align with RTL, use an 8-window approach to block resolveQ.
When there is a conflict in tage updates, resolveQ cannot dequeue and fails to update the entire BPU.
After accumulating 8 times, it blocks BPU prediction to allow tage to update successfully once.
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.