Skip to content

fix(csr): recompute status sd from next-state fs/xs - #3469

Merged
JeanRochCoulon merged 2 commits into
openhwfoundation:masterfrom
jf-cc727:fix/cv-6-status-sd-next-state
Aug 14, 2026
Merged

JeanRochCoulon merged 2 commits into
openhwfoundation:masterfrom
jf-cc727:fix/cv-6-status-sd-next-state

Conversation

@jf-cc727

Copy link
Copy Markdown
Contributor
  • [√] I have searched for similar pull requests
  • [√ ] I am a human engaging in an interpersonal interaction. During this interaction, my words are my own and are not generated. If relevant, I provide links to my sources.

This PR fixes a stale sd recomputation issue in the CSR status path.

It recomputes mstatus.sd from mstatus_d.{xs,fs} and vsstatus.sd from vsstatus_d.{xs,fs}, instead of using the old registered _q state. This keeps sd consistent with same-cycle updates that already make fs or xs dirty.

Related issue: #3460

Why this change is needed:

sd is a summary bit derived from the dirty state of fs/xs. In the current implementation, fs can already be updated to Dirty in the next-state logic, while sd is still recomputed from the previous registered state. This creates a one-cycle inconsistency where the visible fs state has advanced but sd still reflects the old value.

Validation:

  • validated with the test reproducer
  • the reproducer passes with this patch applied (tohost = 0)

Current limitation:

This is a narrow consistency fix for sd recomputation and does not otherwise change CSR status semantics.

@jf-cc727
jf-cc727 force-pushed the fix/cv-6-status-sd-next-state branch from 4ab4b3f to 901e9a0 Compare August 12, 2026 11:57
@github-actions

Copy link
Copy Markdown
Contributor

❌ failed run, report available here.

@JeanRochCoulon
JeanRochCoulon merged commit 6ee41ed into openhwfoundation:master Aug 14, 2026
16 checks passed
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