Skip to content
New issue

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

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

Already on GitHub? # to your account

[Issue #38] RISC-V csrd rework #61

Merged
merged 17 commits into from
Apr 26, 2024
Merged

Conversation

HanyzPAPU
Copy link
Collaborator

I've reworked the csrd command to dump only selected CSRs.

I've also implemented a new subcommand feature for csrd - you can specify a subcommand instead of the CSR name/number which prints out a subset of CSRs.

The implemented subcommands are:

  • mmode: prints all M-mode CSRs
  • smode: prints all S-mode CSRs
  • counters: prints all counter and counter setup CSRs
  • all: prints all CSRs

The csrd command without any parameter now dumps the following CSRs:

  • mstatus
  • medeleg
  • mideleg
  • mie
  • mtvec
  • mcounteren
  • mscratch
  • mepc
  • mcause
  • mtval
  • mip
  • sstatus
  • sie
  • stvec
  • scounteren
  • sscratch
  • sepc
  • scause
  • stval
  • sip
  • satp
  • scyclecmp

A discussion about the included CSRs is welcome, I've chosen them arbitrarily by removing the counters, configuration and debug CSRs.

Note that this PR follows PR #60.

@vhotspur vhotspur marked this pull request as ready for review April 26, 2024 14:05
@vhotspur
Copy link
Member

Merging, I think the selection is OK for now (we can fine tune it based on feedback from next semester labs).

@vhotspur vhotspur merged commit 04a1891 into d-iii-s:master Apr 26, 2024
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants