riscv-software-src / riscv-tests

Other
876 stars 451 forks source link

Add Zacas extension #492

Open ved-rivos opened 1 year ago

ved-rivos commented 1 year ago

This PR adds tests for the Zacas extension that introduces the following instructions:

aswaterman commented 1 year ago

@ved-rivos did you make sure these can run on Spike?

ved-rivos commented 1 year ago

I have tested them on sail but not on spike.

aswaterman commented 1 year ago

Good enough for me.

aswaterman commented 1 year ago

Actually, good enough for me to believe the test cases are correct, but not good enough for being able to merge this :) We need it to be the case that executing make run in the isa directory succeeds. I think that means you need to add _zacas to the ISA strings in isa/Makefile so that the extension will be enabled for Spike. After doing that and making sure they run on Spike, we can merge.

ved-rivos commented 1 year ago

Thanks. These and all other tests pass on spike but the breakpoint.S test seems to be failing. I am not sure if I caused it (I most likely did not since I only added amocas tests :) ). I will update the PR after that debug that to be sure.

ved-rivos commented 1 year ago

Updated PR to extend the ISA string (breakpoint.S failure seems unrelated to addition of these tests). FYI - SAIL PR: https://github.com/riscv/sail-riscv/pull/285

aswaterman commented 1 year ago

Thanks, @ved-rivos. I’m sure you’re right, and I’ll look into the breakpoint test failure myself.

ved-rivos commented 1 year ago

@aswaterman - Found some time to look at this today. Seems like the test was not factoring in the case that when tcontrol is not implemented, mstatus.mie must be 1 for trigger with action=0 to match. I have sent PR #494 with a fix.