Skip to content

Fix CMO prefetch handling of pma uncacheable - #152

Open
Jackie425 wants to merge 2 commits into
openhwfoundation:masterfrom
Jackie425:fix
Open

Jackie425 wants to merge 2 commits into
openhwfoundation:masterfrom
Jackie425:fix

Conversation

@Jackie425

Copy link
Copy Markdown
Contributor

Hi,

Based on #151, this PR proposes one possible way to handle CMO prefetch with pma.uncacheable.

The proposed behavior is:

  • When cfg_enable_i = 0, fence/invalidate/flush can still be handled normally, while prefetch remains load-like and is forced to the uncacheable path, which results in an error.
  • When cfg_enable_i = 1, the three other CMO operations keep their current behavior, and prefetch could also treat pma.uncacheable as Don't Care, consistent with the specification.

This change implements that interpretation by ignoring pma.uncacheable for prefetch only when the cache is enabled.

Could you please confirm whether this matches the intended behavior, or whether prefetch is intentionally expected to be treated differently from the other CMO operations?

Thanks.

Signed-off-by: Jackie425 <jackiejiang425@outlook.com>
@Jackie425
Jackie425 requested a review from cfuguet as a code owner September 8, 2026 11:24
Copilot AI lite review requested due to automatic review settings September 8, 2026 11:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The stage-0 st0_req_is_uncacheable change forces uncacheable when cfg_enable_i=0 for all request sources, which can unintentionally suppress scrubber cachedata reads and effectively disable ECC scrubbing while disabled.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adjusts HPDcache control logic so that CMO prefetch ignores pma.uncacheable only when the cache is enabled, aligning behavior with the “Don’t Care” specification noted in Issue #151 and preventing prefetch from being routed to the uncacheable/error path in that mode.

Changes:

  • Updates stage-0 decode of st0_req_is_uncacheable to special-case CMO prefetch when cfg_enable_i=1.
  • Updates stage-1 decode of st1_req_is_uncacheable similarly, ensuring prefetch is treated as cacheable when enabled.
File summaries
File Description
rtl/src/hpdcache_ctrl.sv Alters stage-0 and stage-1 “uncacheable” classification to ignore pma.uncacheable for CMO prefetch when the cache is enabled.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rtl/src/hpdcache_ctrl.sv Outdated
Signed-off-by: Jackie425 <jackiejiang425@outlook.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is localized, consistent across stage 0/1 decoding, and directly addresses the reported misrouting of CMO prefetch under pma.uncacheable when the cache is enabled.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

2 participants