Skip to content

cpu-o3: Add replayed load completion counter#765

Open
happy-lx wants to merge 1 commit intoxs-devfrom
lsq-replay-counter
Open

cpu-o3: Add replayed load completion counter#765
happy-lx wants to merge 1 commit intoxs-devfrom
lsq-replay-counter

Conversation

@happy-lx
Copy link
Contributor

@happy-lx happy-lx commented Feb 27, 2026

Add a load instruction replay success rate counter to evaluate the effectiveness of replay behavior and provide a reference for RTL.

Change-Id: I78887a7eb4d90ad5b5a3a870977ff9aabd621468

Change-Id: I78887a7eb4d90ad5b5a3a870977ff9aabd621468
@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7542d58 and 014d5f3.

📒 Files selected for processing (3)
  • src/cpu/o3/dyn_inst.hh
  • src/cpu/o3/lsq_unit.cc
  • src/cpu/o3/lsq_unit.hh

📝 Walkthrough

Walkthrough

This PR introduces instruction replay tracking by adding an everReplayed() accessor to DynInst and implementing three new LSQUnit statistics to monitor replayed load execution: issue-to-pipeline count, ready-to-finish count, and their computed finish rate. The statistics are initialized and incremented at relevant stages of the load pipeline.

Changes

Cohort / File(s) Summary
Instruction Replay Metadata
src/cpu/o3/dyn_inst.hh
Added boolean flag and public everReplayed() const accessor to track whether an instruction has ever been replayed.
LSQUnit Statistics Definition
src/cpu/o3/lsq_unit.hh
Added three public statistics members to LSQUnitStats: replayedLoadIssueToPipe (Scalar), replayedLoadReadyToFinish (Scalar), and replayedLoadFinishRate (Formula/Ratio).
LSQUnit Statistics Implementation
src/cpu/o3/lsq_unit.cc
Initialized new statistics with precision setting; added counter increments in issueToLoadPipe() and executeLoadPipeSx() to track replayed load progression through the pipeline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • Ergou-ren
  • jensen-yan

Poem

🐰 A load replays, we track its way,
From pipe to finish, day by day,
With ratios and counters bright,
The replay story now in sight! 📊✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing replayed load completion counters/statistics across three files in the O3 CPU module.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lsq-replay-counter

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🚀 Coremark Smoke Test Results

Branch IPC Change
Base (xs-dev) 2.1727 -
This PR 2.1727 ➡️ 0.0000 (0.00%)

✅ Difftest smoke test passed!

@happy-lx
Copy link
Contributor Author

Detailed stats:
replay-successful-rate.xlsx

According to SPEC06:
image

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.

1 participant