cva6
cva6 copied to clipboard
How to Implement and Use a Custom Instruction in CVA6
Hi
I want to implement a new instruction, but I can't find a clear explanation of how to do it. Is there any guide on how to add a custom instruction to the toolchain (I'm not sure where) and how to build our program with the new compiler?
The CVA6 already has an example coprocessor with the instruction "adds rs1, rs2(, rs3)." If I want to use this instruction in my code, how can I do that and how can I compile the code containing this instruction?
Hello,
verif/regress/cvxif_verif_regression.sh and verif/tests/testlist_cvxif.yaml will guide you on how to compile and run a test with custom instructions. Most of those defined in the example coprocessor are defined in software in cvxif_macros.h
CVA6 will offload every instruction it can not decode to the CoreV-X-interface. This way you can easily implement custom instruction in your own coprocessor.
👋 Hi there!
This issue seems inactive. Need more help? Feel free to update us. If there are no updates within the next few days, we'll go ahead and close this issue. 😊