This is the PasVulkan-based emulator frontend for the PasRISCV RV64GC RISCV-V emulator.
You need to have the following installed:
- FreePascal (unstable dev version) + Lazarus or a recent version of Embarcadero Delphi
- PasVulkan with all its dependencies and submodules (which includes PasRISCV and PasTerm already)
Clone this pasriscemu repository with all submodules into the projects directory of the PasVulkan repository:
cd /path/to/pasvulkan/projects
git clone --recurse-submodules https://github.com/BeRo1985/pasriscvemu.git
But not other way around, because the pasriscvemu repository is dependent on the PasVulkan repository, because of relative paths in the project files. PasVulkan itself has already submodules for PasRISCV and PasTerm, which are also needed by pasriscvemu, where PasRISCV is the actual RISCV-V emulator core and PasTerm is the terminal emulator for the serial console when the framebuffer isn't currently active.
Just open the pasriscvemu.lpi
in Lazarus or 'pasriscvemu.dproj' in Delphi and compile it. The executable will be in the bin
directory.
Just run the pasriscvemu
executable in the bin
directory. Otherwise look below for the command line options.
Command Line | Default | Description |
---|---|---|
-debug [port] | -1 |
Enable GDB remote debugging on port |
-smp [cpucores] | 2 |
Number of CPU cores to emulate |
-memory [ram] | 2GiB |
Amount of RAM to emulate |
-bios [filename] | fw_jump.bin |
Filename of the BIOS firmware image |
-kernel [filename] | kernel.bin |
Filename of the kernel image |
-no-kernel | Do not load a kernel image | |
-initrd [filename] | Filename of the initial ramdisk image | |
-no-initrd | Do not load an initial ramdisk image | |
-virtioblock [filename] | Filename of the VirtIO block device image | |
-no-virtioblock | Do not load a VirtIO block device image | |
-nvme [filename] | Filename of the NVMe block device image | |
-no-nvme | Do not load a NVMe block device image | |
-bootargs [bootparams] | root=/dev/mem rw earlyprintk console=$LINUXUART$ console=tty0 earlycon=sbi |
Boot arguments for the kernel |
CTRL+F12 toggles between the framebuffer and the serial console.
Because pasriscvemu is just a PasVulkan-based frontend for the PasRISCV emulator core, which is a standalone library and can be used in other projects as well.
Because pasriscvemu is a separate project and not directly related to Vulkan, but it uses PasVulkan as a frontend for the framebuffer output. But PasVulkan maybe get a dependency on PasRISCV in the future, for example for cross-platform "scripting" purposes and so on, but not the other way around. So PasVulkan has already submodules for PasRISCV and PasTerm, which are also needed by pasriscvemu.
- PasVulkan - PasVulkan itself
- PasRISCV - The RISCV-V emulator core
- PasTerm - The terminal emulator for the serial console
- PasMP - A parallel-processing/multi-processing library for Object Pascal
- RNL - RNL - Realtime Network Library - The opensource reliable UDP network library, including cryptography, which is used by PasRISCV for various purposes
- And more at here
Creating is my passion, and with your support, I can keep it alive. Support my work and help me continue innovating. Every contribution makes a difference: You can donate and support me here. Thank you!
This project is licensed under the zlib License - see the LICENSE file for details.