Skip to content

fix issue 3637: mstatus.SD stays clear when mstatus.VS is Dirty - #3638

Open
huntersubmit wants to merge 1 commit into
openhwfoundation:masterfrom
huntersubmit:fix-issue-3637
Open

huntersubmit wants to merge 1 commit into
openhwfoundation:masterfrom
huntersubmit:fix-issue-3637

Conversation

@huntersubmit

Copy link
Copy Markdown

Fix issue 3637

issue: #3637

Summary

This PR fixes the computation of the mstatus.SD summary bit when the vector state (mstatus.VS) is Dirty.

Root cause analysis

The existing mstatus.SD logic only checked whether mstatus.XS or mstatus.FS was Dirty.

It did not include mstatus.VS, even though VS is another state-status field summarized by SD.

As a result, when VS became Dirty, SD remained clear unless XS or FS was also Dirty.

The surrounding configuration guard also covered only the supervisor and floating-point configuration flags.

It did not include CVA6Cfg.RVV, so a vector-enabled configuration was not independently sufficient to enable the summary-bit computation.

Fix

The mstatus.SD expression now includes (mstatus_d.vs == riscv::Dirty) alongside the existing XS and FS conditions.
The configuration guard also includes CVA6Cfg.RVV.

The computation uses the next-state value mstatus_d.vs, preserving the existing combinational update model and ensuring that SD is asserted in the same update in which vector state becomes Dirty.

This branch has not been deployed

No deployments
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