Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LCOFI bit implementation in hvip register #1887

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

fly-1011
Copy link
Contributor

@fly-1011 fly-1011 commented Jan 9, 2025

This PR fixes the implementation of the LCOFI bit in the hvip register in Spike.

The RISC-V specification states:

For implementations that support Smcdeleg/Ssccfg, Sscofpmf, Smaia/Ssaia, and the H extension, the LCOFI bit (bit 13) in each of hvip and hvien is implemented and writable.

According to this description, the LCOFI bit in hvip should only be implemented and writable when all the above extensions (Smcdeleg/Ssccfg, Sscofpmf, Smaia/Ssaia, and the H extension) are implemented.

Spike doesn't support AIA, so for now, this bit shouldn't be implemented at all.

Resolves #1886

Copy link
Collaborator

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

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

@NewPaulWalker note that this essentially reverts #1862, but it does appear to be the correct thing to do when AIA is not implemented.

@aswaterman aswaterman merged commit fa05e4e into riscv-software-src:master Jan 9, 2025
3 checks passed
@NewPaulWalker
Copy link
Contributor

@NewPaulWalker note that this essentially reverts #1862, but it does appear to be the correct thing to do when AIA is not implemented.

I agree with this statement. I apologize for my previous misunderstanding and appreciate your effort in identifying and resolving this issue.

@aswaterman
Copy link
Collaborator

No prob.

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.

Writability of the LCOFI Bit in hvip
3 participants