Repository navigation
fix issue 3637: mstatus.SD stays clear when mstatus.VS is Dirty - #3638
Open
huntersubmit wants to merge 1 commit into
Open
huntersubmit wants to merge 1 commit into
huntersubmit wants to merge 1 commit into
Conversation
huntersubmit
force-pushed
the
fix-issue-3637
branch
from
October 16, 2026 11:35
85bf908 to
447ecd7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix issue 3637
issue: #3637
Summary
This PR fixes the computation of the
mstatus.SDsummary bit when the vector state (mstatus.VS) is Dirty.Root cause analysis
The existing
mstatus.SDlogic only checked whethermstatus.XSormstatus.FSwas Dirty.It did not include
mstatus.VS, even thoughVSis another state-status field summarized bySD.As a result, when
VSbecame Dirty,SDremained clear unlessXSorFSwas 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.SDexpression now includes(mstatus_d.vs == riscv::Dirty)alongside the existingXSandFSconditions.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 thatSDis asserted in the same update in which vector state becomes Dirty.