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

replace vxrm with vcsr[vxrm] #564

Merged
merged 8 commits into from
Oct 2, 2024
Merged

replace vxrm with vcsr[vxrm] #564

merged 8 commits into from
Oct 2, 2024

Conversation

rez5427
Copy link
Contributor

@rez5427 rez5427 commented Sep 28, 2024

When I run the vasub test file from the riscv-vector-test suite, I encountered a discrepancy between the outputs of Sail-RISCV and Spike, as shown in the image (highlighted in red). The issue stems from the function get_fixed_rounding_incr, which is incorrectly using the vxrm[1..0] bits instead of vcsr[vxrm]. The vxrm register is not being set by a CSR instruction; it is initialized to zero and remains zero throughout the execution, causing this mismatch.

image

@Timmmm
Copy link
Collaborator

Timmmm commented Sep 28, 2024

Presumably this issue also exists for vxsat? I think we should also fix the duplicate read_csr and write_csr clauses at the same time.

Copy link

github-actions bot commented Sep 28, 2024

Test Results

396 tests  ±0   396 ✅ ±0   0s ⏱️ ±0s
  4 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit dae4fc0. ± Comparison against base commit b63b12f.

♻️ This comment has been updated with latest results.

@rez5427
Copy link
Contributor Author

rez5427 commented Sep 28, 2024

Is it appropriate to remove the registers vxrm and vxset in this context?

@Alasdair
Copy link
Collaborator

I don't think vxrm and vxsat should be actual Sail registers no, I think they are just parts of vcsr that should be accessible via the read_csr and write_csr functions.

Copy link
Collaborator

@Alasdair Alasdair left a comment

Choose a reason for hiding this comment

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

Note: we should make sure to squash these commits before merging.

@Timmmm Timmmm merged commit 47380fa into riscv:master Oct 2, 2024
2 checks passed
@rez5427 rez5427 deleted the v_csr_vxrm branch October 10, 2024 16:48
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.

4 participants