Skip to content

Commit 80d3dc3

Browse files
committed
Refine document
1 parent 51de954 commit 80d3dc3

File tree

2 files changed

+68
-29
lines changed

2 files changed

+68
-29
lines changed

README.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -327,36 +327,8 @@ Use of this source code is governed by a MIT license that can be found in the [L
327327

328328
## External sources
329329

330-
There are some prebuilt executables in [rv32emu-prebuilt](https://github.com/sysprog21/rv32emu-prebuilt) for testing and benchmarking purpose.
331-
The prebuilt executables are built from GNU/GCC v9 and [xPack GCC v14.2.0-1](https://github.com/xpack-dev-tools/gcc-xpack) under Ubuntu-20.04.
330+
See [docs/prebuilt.md](docs/prebuilt.md).
332331

333-
To fetch the prebuilt executables, run the following command:
334-
335-
```shell
336-
$ make artifact
337-
```
338-
339-
Or, to compile the executables from scratch, run:
340-
341-
```shell
342-
$ make artifact USE_PREBUILT=0 [CROSS_COMPILE=<COMPILER_PREFIX>]
343-
```
344-
345-
Notice that the RISC-V cross-compiler is required to build the binary.
346-
347-
In default, `rv32emu` will download the tarball from GitHub and extract the executables into `build/`.
348-
349-
There are still some prebuilt ELF files for testing purpose under `build/`.
350-
* `cc.elf` : See [tests/cc](tests/cc)
351-
* `chacha20.elf` : See [tests/chacha20](tests/chacha20)
352-
* `doom.elf` : See [sysprog21/doom_riscv](https://github.com/sysprog21/doom_riscv) [RV32M]
353-
* `ieee754.elf` : See [tests/ieee754.c](tests/ieee754.c) [RV32F]
354-
* `jit-bf.elf` : See [ezaki-k/xkon_beta](https://github.com/ezaki-k/xkon_beta)
355-
* `quake.elf` : See [sysprog21/quake-embedded](https://github.com/sysprog21/quake-embedded) [RV32F]
356-
* `readelf.elf` : See [tests/readelf](tests/readelf)
357-
* `rvsim.elf` : See [tests/rvsim.c](tests/rvsim.c)
358-
* `scimark2.elf` : See [tests/scimark2](tests/scimark2) [RV32MF]
359-
* `smolnes.elf` : See [tests/smolnes](tests/smolnes.c) [RV32M]
360332
## Reference
361333

362334
* [Writing a simple RISC-V emulator in plain C](https://fmash16.github.io/content/posts/riscv-emulator-in-c.html)

docs/prebuilt.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Prebuilt Binaries
2+
3+
There are some prebuilt binaries placed in [rv32emu-prebuilt](https://github.com/sysprog21/rv32emu-prebuilt).
4+
When invoking testing or benchmarking, the prebuilt binaries will be pulled into `build/linux-x64/` and `build/riscv32/` directory in default.
5+
The RISC-V binaries are built from [xPack RISC-V GCC toolchain](https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack) with `-march=rv32im -mabi=ilp32` options.
6+
7+
To fetch the prebuilt binaries manually, run:
8+
9+
```shell
10+
$ make artifact
11+
```
12+
13+
Or build the binaries from scratch (the RISC-V cross-compiler is required):
14+
15+
```shell
16+
$ make artifact USE_PREBUILT=0 [CROSS_COMPILE=<COMPILER_PREFIX>]
17+
```
18+
19+
The compiler prefix varies according to the used toolchain, such as `riscv-none-elf-`, `riscv32-unknwon-elf-`, etc.
20+
21+
The prebuilt binaries in `rv32emu-prebuilt` are built from the following repositories and resources:
22+
23+
- [ansibench](https://github.com/nfinit/ansibench)
24+
- coremark
25+
- stream
26+
- nbench
27+
- [rv8-bench](https://github.com/michaeljclark/rv8-bench)
28+
- aes
29+
- dhrystone
30+
- miniz
31+
- norx
32+
- primes
33+
- qsort
34+
- sha512
35+
- `captcha` : See [tests/captcha.c](tests/captcha.c)
36+
- `donut` : See [donut.c](tests/donut.c)
37+
- `fcalc` : See [fcalc.c](tests/fcalc.c)
38+
- `hamilton` : See [hamilton.c](tests/hamilton.c)
39+
- `jit` : See [tests/jit.c](tests/jit.c)
40+
- `lena`: See [tests/lena.c](tests/lena.c)
41+
- `line` : See [tests/line.c](tests/line.c)
42+
- `maj2random` : See [tests/maj2random.c](tests/maj2random.c)
43+
- `mandelbrot` : See [tests/mandelbrot.c](tests/mandelbrot.c)
44+
- `nqueens` : See [tests/nqueens.c](tests/nqueens.c)
45+
- `nyancat` : See [tests/nyancat.c](tests/nyancat.c)
46+
- `pi` : See [tests/pi.c](tests/pi.c)
47+
- `puzzle` : See [tests/puzzle.c](tests/puzzle.c)
48+
- `qrcode` : See [tests/qrcode.c](tests/qrcode.c)
49+
- `richards` : See [tests/richards.c](tests/richards.c)
50+
- `rvsim` : See [tests/rvsim.c](tests/rvsim.c)
51+
- `spirograph` : See [tests/spirograph.c](tests/spirograph.c)
52+
- `uaes` : See [tests/uaes.c](tests/uaes.c)
53+
54+
---
55+
56+
There are still some prebuilt standalone RISC-V binaries under `build/` directory only for testing purpose:
57+
58+
- `hello.elf` : See [tests/asm-hello](tests/asm-hello)
59+
- `cc.elf` : See [tests/cc](tests/cc)
60+
- `chacha20.elf` : See [tests/chacha20](tests/chacha20)
61+
- `doom.elf` : See [sysprog21/doom_riscv](https://github.com/sysprog21/doom_riscv) [RV32M]
62+
- `ieee754.elf` : See [tests/ieee754.c](tests/ieee754.c) [RV32F]
63+
- `jit-bf.elf` : See [ezaki-k/xkon_beta](https://github.com/ezaki-k/xkon_beta)
64+
- `quake.elf` : See [sysprog21/quake-embedded](https://github.com/sysprog21/quake-embedded) [RV32F]
65+
- `readelf.elf` : See [tests/readelf](tests/readelf)
66+
- `scimark2.elf` : See [tests/scimark2](tests/scimark2) [RV32MF]
67+
- `smolnes.elf` : See [tests/smolnes](tests/smolnes.c) [RV32M]

0 commit comments

Comments
 (0)