Yet another RISC-V Simulator on the web, running on Webassembly! https://riscv.vercel.app/
MIT License
Yet another RISC-V Simulator on the web, for fun. Based on Kite, RISC-V architecture simulator I used for my computer architecture class (EEE3530) at Yonsei University. Turned it into Webassembly to use it on web. Again, it's just for fun.... and probably education. Lol.
Detailed instruction on how to use it is found at the repository of Kite.
To enable communication with javascript from Webassembly binary, a few things have been changed in Kite's code:
const char* program_code, const char* memory_state, const char* reg_state
as parameters and runs it. const char*
is directly supplied from javascript.-DDEBUG
, -DDATA_FWD
, -DBR_PRED
); They are also directly supplied from javascript as well.cerr
and exit(1);
. For example:
if(val != 1) {
throw std::logic_error("Cache Error: number of sets must be a power of two");
}
This allows javascript to catch an error and display the error message.