Voyager CPU
Voyager is a (very) experimental Python emulator of a 32-bit RISC-V core. It's built for research and education with simplicity in mind.
Features
- Supports the RV32I ISA using a non-pipelined CPU with a single-cycle instruction fetch, decode, and execution stage.
- A simple virtual RAM into which test programs (ELF binaries) are loaded.
- The official RISC-V ISA tests can be used for this purpose (see below).
- A basic REPL for viewing register and RAM contents, and executing the next N cycles.
- MIT license.
Build and Run
- (Optional) Clone the pre-built RV32UI tests using:
git submodule init
git submodule update
The binaries will be placed under tests/riscv-tests-prebuilt-binaries/. Alternatively, you can build the test suites from the official repo.
-
See the example in
src/voyagercpu/example.py. You may run this directly usingpython src/voyagercpu/example.py. -
Enjoy!
-
(Optional) Run the Voyager unit tests using
pytest
Todo
- Add more tests, particularly at the execution stage.
- Implement some ISA extensions, e.g. the M and C specifications.
- Add pipelining and privileged mode.
- Improve pretty printing.
- Etc.
Please contribute!
Release files for voyager-cpu 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| voyager_cpu-0.2.4.tar.gz | 659.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| voyager_cpu-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 669.3 kB
Release files / voyager_cpu-0.2.4.tar.gz
| Download URL | voyager_cpu-0.2.4.tar.gz |
|---|---|
| Size | 659.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
264c7f522237d80f851a1f2313c5346acda3b36084a9095f800d00e03debd9ad
|
|
BLAKE2b-256 checksum How to use checksums |
019272ff39665ca32027930e3d050d2d13a543a46afc536efa297a695976db64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|
Release files / voyager_cpu-0.2.4-py3-none-any.whl
| Download URL | voyager_cpu-0.2.4-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7b0857ac2079e832894db35338ffc53816c5ed23fa8b7f1eebff0d8eeaa89ad
|
|
BLAKE2b-256 checksum How to use checksums |
4e6fb7790c5c729c0f9286bc8b47c3c3a4696d0dfa59ef9cf3a13fddc321de07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|