dv: enable read-only CSRs in csr_description.yaml - #2481
Open
Talha-Dmr wants to merge 1 commit into
Open
Conversation
Fixes first item of lowRISC#1337: CSR test generation now correctly handles read-only fields via riscv_csr_instr allow_ro_write handling. Uncomment mvendorid, marchid, mimpid and mhartid (all type R) that were previously commented out because the generator could not deal with them. The generator will now only generate reads (CSRRS/CSRRC with rs1==0) for these CSRs, avoiding illegal instruction exceptions and test timeouts. Signed-off-by: Talha-Dmr <> Signed-off-by: Talha-Dmr <talhademir-100@hotmail.com>
|
All contributors have signed the CLA ✍️ ✅ |
Talha-Dmr
marked this pull request as ready for review
August 27, 2026 19:51
Author
|
I have read the CLA Document. By submitting this pull request comment, I am hereby confirming my acceptance of the terms of the CLA Document and my agreement to be legally bound by its terms. |
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.
Fixes first item of #1337
CSR test generation now correctly handles read-only fields via riscv_csr_instr allow_ro_write handling (csr[11:10]==2'b11 check). Previously mvendorid, marchid, mimpid and mhartid were commented out because the generator would generate writes that triggered illegal instruction exceptions and test timeouts. Now they are uncommented and will only generate reads (CSRRS/CSRRC with rs1==0 / CSRRSI/CSRRCI with imm==0), avoiding the timeout.
Test: verified csr_description.yaml parses and riscv_csr_test generation no longer times out on read-only CSRs.