4 ms·
Nice work! How did you debug it? Did you run it against the 'official' RISC-V models Spike [1] or Sail [2]? [1] https://github.com/riscv-software-src/riscv-is
by YorkshireSeason 4y ago
Nice work!
How did you debug it? Did you run it against the 'official' RISC-V models Spike [1] or Sail [2]?
[1] https://github.com/riscv-software-src/riscv-isa-sim https://github.com/riscv-software-src/riscv-isa-sim
[2] https://github.com/riscv/sail-riscv https://github.com/riscv/sail-riscv
- fwsgonzo 4y agoYes, I used Spike quite a bit in the beginning. I also compared with my own instruction logging with objdump -drl program | less. These days I have a decent test suite. I verify Go and Zig hello worlds (both running through a surprising amount of code): https://github.com/fwsGonzo/libriscv/blob/master/tests/unit/verify_elf.cpp https://github.com/fwsGonzo/libriscv/blob/master/tests/unit/... And I generate a mandelbrot that I compare: https://github.com/fwsGonzo/libriscv/blob/master/tests/unit/png.cpp https://github.com/fwsGonzo/libriscv/blob/master/tests/unit/... While most tests produce RISC-V programs which are run to completion as part of the test, that still might not cover every edge case, though. I have tried to integrate with the riscv-tests repository, but it uses a lot of privileged instructions. After I have implemented more of the supervisor extension I will be able to run those tests.