Skip to content

Conversation

KushalMeghani1644
Copy link

This PR adds support for the dcsr (Debug Control and Status Register) CSR.

Changes:

  • Added dcsr.rs under src/register/
  • Exposed it in register.rs

This addresses issue #1

@KushalMeghani1644 KushalMeghani1644 requested a review from a team as a code owner September 9, 2025 10:23
Copy link
Contributor

@romancardenas romancardenas left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Please, find my comments attached.

- Implemented the dcsr CSR (0x7b0) with all fields as per RISC-V Debug Spec v0.13
- Added enums for cause and prv fields for type-safe access
- Provided getters and setters for all readable/writable fields
- Added unit tests for bitfields, enums, and convenience methods
Copy link
Contributor

@romancardenas romancardenas left a comment

Choose a reason for hiding this comment

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

Same here: please, do NOT remove anything from the riscv/riscv/CHANGELONG.md file. This file is essential to keep track of changes in the crate across releases. Please, only add on the top (on the [Unreleased] tag) your new contributions.

@KushalMeghani1644
Copy link
Author

I hope the changes I have made for the CHANGELOG.md are fine now. If there are still problems I will be happy to fix them.

@romancardenas
Copy link
Contributor

Hey @KushalMeghani1644 take a look at the changes in your PR: https://github.com/rust-embedded/riscv/pull/342/files

Notice that changelog files are wrong; you included a file at the root of the directory of this repo that is not required. Also, you almost removed all the content in the changelog file inside the riscv subfolder. This is against the purpose of changelog files, which are supposed to be a timeline of the changes across time.

Please, try to be careful with these changes, and address the comments reviewers included in previous reviews. Our time is limited, and we really appreciate it if contributors make our lives a little bit easier.

@romancardenas
Copy link
Contributor

As an example of good practices, look at this PR: https://github.com/rust-embedded/riscv/pull/343/files

  • Only two commits (1st for first contribution, 2nd for addressing review)
  • Very small changes in the changelog file: just adding what is new

We expect something like this to enable the actual review of the contribution.

@KushalMeghani1644
Copy link
Author

Hey @romancardenas I am sorry for the inconvenience regarding the CHANGELOG.md, thanks for putting time into my PR. This time I have only kept the CHANGELOG.md with reference to the PR you pointed out (https://github.com/rust-embedded/riscv/pull/343/files) inside the subfolder. And have removed the unnecessary CHANGELOG.md that was at the root of the folder. I hope the changes I made this time are fine.

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.

2 participants