Skip to main content

Voyager CPU

PyPI PyPI - Python Version PyPI - Downloads PyPI - License

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.
  • A basic REPL for viewing register and RAM contents, and executing the next N cycles.
  • MIT license.

Build and Run

  1. (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.

  1. See the example in src/voyagercpu/example.py. You may run this directly using python src/voyagercpu/example.py.

  2. Enjoy!

  3. (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)

Source distribution for voyager-cpu 0.2.4
File Size Uploaded
voyager_cpu-0.2.4.tar.gz 659.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for voyager-cpu 0.2.4
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page