A tiny C header-only RISC-V emulator
github.com
github.com
I’ll admit: My first reaction was: cool but why not just use qemu to get a more full fledged system, add rv64 etc?
But the readme explains it very well, I admire the dedication and consistency it takes to stick to rv32 no MMU only to be able yo fit it into very minimal environments in the end.
(I myself tend to be much more prone to allowing feature creep :)
And since its just a C header/library, on can just distribute, include and build the simulator alone with the project/tests. As opposed to relying on the user having qemu (or similar) installed.
I will consider using it for emlearn (a Machine Learning Library for microcontrollers).
Writing a Really Tiny RISC-V Emulator by CNLohr https://www.youtube.com/watch?v=YT5vB3UqU_E
And Mr. Bellard did the same thing (but not packaged is a nice header): https://bellard.org