lcgamboa / picsimlab

PICsimLab - Programmable IC Simulator Laboratory
GNU General Public License v2.0
455 stars 88 forks source link

Support RISC-V MCUs simulation #83

Closed tpimh closed 1 year ago

tpimh commented 1 year ago

I would like to simulate a RISC-V MCU, for example, SiFive FE310. What are the available options? Possibly, QEMU can be used similar to ARM and Xtensa?

lcgamboa commented 1 year ago

Hi @tpimh ,

I recently added support for a board with the ESP32-C3 which is a 32 bits RISC-V 90bfddd. This board uses espressif's modified version of qemu. As support for C3 peripherals is not yet complete, several things still don't work. It is possible to add other processors supported by qemu, just adapt some peripherals to communicate with PICSimLab. The sifive_u machine is already supported by qemu-system-riscv32 used by ESP32-C3. By making similar modifications it would be possible to add other processors.

tpimh commented 1 year ago

It seems that all required code is already in QEMU, all I need is qemu-system-riscv32 -machine sifive_e.