RV32I emulator is a visual emulator built for RV32I Base Integer Instruction Set
RV32I emulator can be used to do such as:
- How an executable file of RV32I be disassembled.
- How machine code is executed in a single-cycle processor of RV32I machine.
- How register and memory modified by machine.
- How elf header, program header and section header look like in an ELF file.
The text editor in left hand side show the disassembled RISC-V instruction in ELF file compiled for RV32I machine. The file will be opened in read-only mode, you can't modify the ELF file by yourself. Also, there will show pc (program counter) in the left of the editor.
The register in this emulator will show the temporary value of running ELF file. While running the program, the value changing in the same time.
The memory in this emulator will show the temporary value of running ELF file. Memory can be allocated in a wide range, so it can't show the whole memory value at the same time. When you scroll your scroll bar to the temporary upper or lower bound, it will change the upper or lower bound to show more value of memory. In addition, there are two combo box for going to specified memory position by selecting different register or section.
There is a console for showing the stdout in this RV32I emulator. In the top-right, a delete icon can clear the console output directly.
The toolbar have five icons for controlling the RV32I emulator.
In the menu bar Help >> About, It will show the elf header, program header and section header by pressed each button.
There is a prebuilt binary for Windows in Releases, or just downloading the source code and build it in Qt Creator.
There are the steps for compiling Qt project on Linux.
First, installing the qmake.
sudo apt-get install qt5-default qt5-doc-html qt5-qmake qt5-doc qt5-image-formats-plugins
Then, cloning the rv32I-emulator repository.
git clone https://github.com/alankuo04/rv32I-emulator.git
Next, change the directory to src, and run qmake.
cd src/
qmake
The Makefile will generate by qmake, then run make to compile the project.
make
Finally, you get the executable file RV32I_emulator, and you can run it on your pc.
./RV32I_emulator
However, some icons are in wrong position, it will be fixed in the future.