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

Issues with Zbb tests in rv32i_m suite #540

Open
neworderofjamie opened this issue Oct 21, 2024 · 4 comments
Open

Issues with Zbb tests in rv32i_m suite #540

neworderofjamie opened this issue Oct 21, 2024 · 4 comments

Comments

@neworderofjamie
Copy link

I may be missing something here but I think the Zbb tests are being generated incorrectly. For example, for CLZ:

TEST_RD_OP(clz, x31, x31, 0x00000000, 0x55555555, x1, 0, x2)  

0x55555555 has 1 rather than 0 leading zeros. Infact the correctval for all tests of clz, cpop and ctz are 0.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Oct 21, 2024 via email

@UmerShahidengr
Copy link
Collaborator

The correctval value is placed by CTG without actually calculating it, but the macro TEST_RD_OP(defined here) is not using correctval while checking the result. Since the tests are signature based, so the accuracy of the tests depends on if signatures (results) are matching with Sail and Spike.

@neworderofjamie
Copy link
Author

Thanks for all your responses. In short, as the manual says, correctval generation is WIP in CTG and results are normally verified by comparing the in-memory output to Sail (as such in the Sail plugin, the RVMODEL_IO_ASSERT_GPR_EQ which TEST_RD_OP uses via TEST_CAST to check correctval is empty)

@allenjbaum
Copy link
Collaborator

allenjbaum commented Oct 30, 2024 via email

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