You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-42Lines changed: 50 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,13 +23,12 @@ tool and starting point for customization. It is primarily written in C99, utili
23
23
C11 atomics for memory management, with a focus on efficiency and readability.
24
24
25
25
Features:
26
-
* Fast interpreter for executing the RV32 ISA
27
26
* Fast interpreter that faithfully executes the complete RV32 instruction set
28
27
* Full coverage of RV32I / RV32E plus the M (integer multiply–divide), A (atomics), F (single-precision floating-point), C (compressed), and Zba/Zbb/Zbc/Zbs bit-manipulation extensions
29
28
* Built-in ELF loader for user-mode emulation
30
29
* Newlib-compatible system-call layer for standalone programs
31
30
* Minimal system emulation capable of booting an RV32 Linux kernel and running user-space binaries
32
-
*Experimental SDL-based display/event/audio system calls for running video games
31
+
* SDL-based display/event/audio system calls for running video games
33
32
* WebAssembly build for user-mode and system emulation with SDL graphics and audio in modern browsers
34
33
* Remote debugging through the GDB Remote Serial Protocol
35
34
* Tiered JIT compilation for performance boost while maintaining a small footprint
| Computing intensive | puzzle | A sliding puzzle where numbered square tiles are arranged randomly with one tile missing, designed for solving the N-puzzle problem. |
337
-
|| Pi | Calculates the millionth digit of π. |
338
-
|| miniz | Compresses and decompresses 8 MiB of data. |
339
-
|| primes | Finds the largest prime number below 33333333. |
340
-
|| sha512 | Computes the SHA-512 hash of 64 MiB of data. |
341
-
| I/O intensive | Richards | An OS task scheduler simulation benchmark for comparing system implementations. |
342
-
|| Dhrystone | Evaluates string operations, involves frequent memory I/O, and generates the performance metric. |
343
-
| Computing and I/O Hybrid | Mandelbrot | A benchmark based on the Mandelbrot set, which uses fixed-point arithmetic and involves numerous integer operations. |
344
-
|| AES | Includes 23 encryption and decryption algorithms adhering to the Advanced Encryption Standard. |
345
-
|| Nqueens | A puzzle benchmark where n queens are placed on an n × n chessboard without attacking each other, using deep recursion for execution. |
346
-
|| qsort | Sorts an array with 50 million items. |
347
-
348
-
These benchmarks performed by rv32emu (interpreter-only mode) and [Spike](https://github.com/riscv-software-src/riscv-isa-sim) v1.1.0. Ran on Intel Core i7-11700 CPU running at 2.5 GHz and an Ampere [eMAG](https://en.wikichip.org/wiki/ampere_computing/emag) 8180
349
-
microprocessor equipped with 32 Arm64 cores, capable of speeds up to 3.3 GHz. Both systems ran Ubuntu Linux 22.04.1 LTS. We utilized gcc version 12.3, configured as riscv32-unknown-elf-gcc.
350
-
351
-
The figures below illustrate the normalized execution time of rv32emu and Spike, where **the shorter indicates better performance**.
352
-
353
-
_x86-64_
354
-

355
-
356
-
_Arm64_
357
-

340
+
The benchmarks are classified based on their characteristics and cover various aspects of system performance. Most are derived from the industry-standard BYTEmark (nbench) suite, supplemented by cryptographic and system benchmarks:
341
+
342
+
| Benchmark | Description |
343
+
| ------------- | ----------- |
344
+
| numeric sort | Focuses on sorting integer arrays using various algorithms |
These benchmarks were performed by rv32emu (with tiered JIT enabled) and QEMU v9.0.0 on an Intel Core i7-11700 CPU running at 2.5 GHz with Ubuntu Linux 22.04.1 LTS. The toolchain used was GCC v14.2.0 with RV32IM extensions.
356
+
357
+
The figure below illustrates the speedup (normalized reciprocal of average elapsed time over 200 iterations) of rv32emu with tiered JIT compilation compared to QEMU. Higher values indicate better performance.
358
+
359
+

360
+
361
+
**Performance Summary:**
362
+
- rv32emu with tiered JIT compilation outperforms QEMU v9.0.0 across all benchmarks
363
+
- Significant performance gains in compute-intensive workloads (primes, sha512, emfloat)
364
+
- Strong performance in optimization and cryptography benchmarks (assignment, idea, huffman)
365
+
- Consistent advantages in sorting operations (numeric sort, string sort)
366
+
- The tiered JIT approach effectively balances compilation overhead with code optimization quality
358
367
359
368
### Continuous Benchmarking
360
369
Continuous benchmarking is integrated into GitHub Actions,
@@ -373,9 +382,8 @@ There are several files that have the potential to significantly impact the perf
373
382
As a result, any modifications made to these files will trigger the benchmark CI.
374
383
375
384
## GDB Remote Debugging
376
-
`rv32emu` is permitted to operate as gdbstub in an experimental manner since it supports
377
-
a limited number of [GDB Remote Serial Protocol](https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html) (GDBRSP).
378
-
To enable this feature, you need to build the emulator and set`ENABLE_GDBSTUB=1` when running the `make` command.
385
+
`rv32emu` supports a subset of the [GDB Remote Serial Protocol](https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html) (GDBRSP).
386
+
To enable this feature, use the configuration system (e.g., `make config` and enable`ENABLE_GDBSTUB`) or use the predefined configuration with GDB support.
379
387
After that, you might execute it using the command below.
Copy file name to clipboardExpand all lines: docs/base-image.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The goal is to support both `x86-64` and `aarch64` docker images for development and testing.
4
4
5
-
The base images contain`gcc` and `sail`images. We compile from the toolchain from source and use a specific version of the toolchains.
5
+
The base images include`gcc` and `sail`toolchains. We compile the toolchains from source and use specific versions.
6
6
7
7
The build process should be used when an update on the toolchain is required. When a new build is made by running `build.sh`, build and push to Docker Hub are automated.
8
8
@@ -12,4 +12,4 @@ For `gcc`, we are using the compiler version `tags/2023.10.06`, as using the bin
12
12
13
13
For `sail`, we set up the toolchain to use `sail-0.16`, as the latest version `0.17.x` series will cause compilation errors.
14
14
15
-
We are using the commit `9547a30bf84572c458476591b569a95f5232c1c7` from `sail-riscv` for the reference simulator, as this is the commit cloest to the time when the [x86-64 reference sail emulator](https://github.com/sysprog21/rv32emu/commit/01b00b6f175f57ef39ffd1f4fa6a611891e36df3#diff-3b436c5e32c40ecca4095bdacc1fb69c0759096f86e029238ce34bbe73c6e68f) was added to the `rv32emu` Github repo.
15
+
We are using the commit `9547a30bf84572c458476591b569a95f5232c1c7` from `sail-riscv` for the reference simulator, as this is the commit closest to the time when the [x86-64 reference sail emulator](https://github.com/sysprog21/rv32emu/commit/01b00b6f175f57ef39ffd1f4fa6a611891e36df3#diff-3b436c5e32c40ecca4095bdacc1fb69c0759096f86e029238ce34bbe73c6e68f) was added to the `rv32emu` Github repo.
[Doom](https://en.wikipedia.org/wiki/Doom_(franchise)), a pioneering first-person shooter game developed by [id Software](https://en.wikipedia.org/wiki/Id_Software) in 1993, is known for its open-source code and vibrant community.
9
9
It debuted innovations like genuine 3D graphics, networked multiplayer gameplay and the ability for players to create custom expansions.
@@ -19,17 +19,17 @@ It debuted innovations like genuine 3D graphics, networked multiplayer gameplay
Copy file name to clipboardExpand all lines: docs/syscall.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ This mechanism allows code executed on a RISC-V target to interact with and util
112
112
113
113
Any other system calls will fail with an "unknown syscall" error.
114
114
115
-
## Experimental Display, Event, and Sound System Calls
115
+
## Display, Event, and Sound System Calls
116
116
117
117
These system calls are solely for the convenience of accessing the [SDL library](https://www.libsdl.org/) and [SDL2_Mixer](https://wiki.libsdl.org/SDL2_mixer) and are only intended for the presentation of RISC-V graphics applications. They are not present in the ABI interface of POSIX or Linux.
0 commit comments