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

Add more tests which check CSR functionality #21

Open
troibe opened this issue Jan 3, 2024 · 8 comments
Open

Add more tests which check CSR functionality #21

troibe opened this issue Jan 3, 2024 · 8 comments

Comments

@troibe
Copy link
Contributor

troibe commented Jan 3, 2024

Thanks for the test suite. It's super helpful for developing simulators and RTL.
Maybe I missed something but I think the tests currently don't take into accout vxrm, frm, mstatus, sstatus, vsstatus and other CSRs.

@ksco
Copy link
Member

ksco commented Jan 4, 2024

I'm currently busy with other things, but I will add them.

@ksco
Copy link
Member

ksco commented Jan 9, 2024

I already added vxrm and vxsat support.

@troibe
Copy link
Contributor Author

troibe commented Jan 9, 2024

Thanks so much! 🎉

@troibe
Copy link
Contributor Author

troibe commented Jan 29, 2024

I think some vstart related tests would also be helpful.
So far my ISA simulator always set vstart to zero which should lead to issues I think
but there are no test cases covering it as far as I can tell.

@ksco
Copy link
Member

ksco commented Jan 30, 2024

Normally, vstart is written by hardware on a trap, which is not straightforward to fit into our test framework. vstart can also be written by csrrw[i], which is a usage scenario not recommended by the v-spec, I can at least add support for the latter case.

@jerryz123
Copy link
Contributor

Note that implementations are not required to support non-zero vstart for instructions where they would never take a trap in the middle of execution.

@ksco
Copy link
Member

ksco commented Jan 30, 2024

Indeed. Then we have to make vstart support optional for arithmetic instructions if we add it to the test.

Page 14:

For example, some implementations will never take interrupts during execution of a vector arithmetic instruction, instead waiting until the instruction completes to take the interrupt. Such implementations are permitted to raise an illegal instruction exception when attempting to execute a vector arithmetic instruction when vstart is nonzero.

@ksco
Copy link
Member

ksco commented Jan 30, 2024

It is also possible that an implementation that does not support exceptions only supports vstart == 0.

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

3 participants