riscv-software-src / riscv-tools

RISC-V Tools (ISA Simulator and Tests)
1.14k stars 446 forks source link

tutorial on adding new instructions to RISCV ISA? #308

Open kingstone1927 opened 4 years ago

kingstone1927 commented 4 years ago

Does anyone know how to add new instruction to RISCV ISA? I researched online but did not find good detailed/step-by-step on how to.

Thanks

jim-wilson commented 4 years ago

This question has been asked a few times on sw-dev. though these mostly talk about the software side, i.e. updating tools to support the new instruction. https://groups.google.com/a/groups.riscv.org/forum/#!searchin/sw-dev/adding$20|sort:date/sw-dev/CF82G6YjDak/HY7uZhLCAQAJ https://groups.google.com/a/groups.riscv.org/forum/#!searchin/sw-dev/adding$20|sort:date/sw-dev/sL_OHXYj3LY/Gsm6sBc9BQAJ

kingstone1927 commented 4 years ago

This question has been asked a few times on sw-dev. though these mostly talk about the software side, i.e. updating tools to support the new instruction. https://groups.google.com/a/groups.riscv.org/forum/#!searchin/sw-dev/adding$20|sort:date/sw-dev/CF82G6YjDak/HY7uZhLCAQAJ https://groups.google.com/a/groups.riscv.org/forum/#!searchin/sw-dev/adding$20|sort:date/sw-dev/sL_OHXYj3LY/Gsm6sBc9BQAJ

Thank you so much for your answers. I checked out these links and think they are very helpful. However, since I am very very new to ISA and RISCV and anything relating to assembly, I found it was extremely hard to just follow the instructions in the links. I don't know if we have any step by step tutorial with pictures and explanation of each step and commands out there to help the noobs. it would be great for the starter and enlarge the community. Thanks again.