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

Dose write-only operation to csr_seed trigger illegal instruction exception ? #1728

Open
chihminchao opened this issue Jul 15, 2024 · 1 comment

Comments

@chihminchao
Copy link
Contributor

/* Read-only access disallowed due to wipe-on-read side effect */

Based on spec
"The seed CSR must be accessed with a read-write instruction. A read-only instruction such as CSRRS/CSRRC
with rs1=x0 or CSRRSI/CSRRCI with uimm=0 will raise an illegal instruction exception. The write value (in rs1
or uimm) must be ignored by implementations. The purpose of the write is to signal polling and flushing."

It doesn't explicitly specify write-only but require read-write instructions

@aswaterman
Copy link
Collaborator

The belief of the ARC is that the spec was poorly worded but intended to only forbid read-only accesses. (i.e. write-only accesses are legal.) So, Spike is correct as-is. See riscv/riscv-isa-manual#1540

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

No branches or pull requests

2 participants