Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atoomnetmarc/risc-v-emulator-riscof
My try at running the riscv-arch-test using RISCOF against my RISC-V emulator.
https://github.com/atoomnetmarc/risc-v-emulator-riscof
riscof riscv testing
Last synced: about 4 hours ago
JSON representation
My try at running the riscv-arch-test using RISCOF against my RISC-V emulator.
- Host: GitHub
- URL: https://github.com/atoomnetmarc/risc-v-emulator-riscof
- Owner: atoomnetmarc
- License: apache-2.0
- Created: 2024-03-29T16:30:45.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T17:22:21.000Z (5 months ago)
- Last Synced: 2024-09-08T19:12:51.188Z (5 months ago)
- Topics: riscof, riscv, testing
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-gentoo.md
- License: LICENSE
Awesome Lists containing this project
README
These instructions try to install RISCOF, RISC-V toolchain and SAIL under Gentoo Linux needed for running `runtests.sh`.
# Install general tools
```bash
sudo emerge --sync
sudo emerge --noreplace dev-lang/python dev-python/pip dev-vcs/git dev-python/virtualenv
```# Install RISCOF
Create virtual environment:
```bash
# cd some_work_directory_without_spaces
virtualenv venv-riscof
```Activate virtual environment:
```bash
source venv-riscof/bin/activate
```Install known working version of RISCOF in virtual environment.
```bash
pip install git+https://github.com/riscv/riscof.git@d38859f85fe407bcacddd2efcd355ada4683aee4
```Test if working:
```bash
riscof --help
```Deactivate virtual environment:
```bash
deactivate
```# Install RISCV-GNU Toolchain
```bash
sudo eselect repository enable riscv
sudo emerge --sync riscv
sudo emerge --noreplace crossdev
sudo crossdev --target riscv32-unknown-elf
```Test RISCV gcc:
```bash
riscv32-unknown-elf-gcc --version
```# SAIL
Compile reference emulator:
```bash
sudo emerge --noreplace dev-ml/opam sci-mathematics/z3opam init -y --disable-sandboxing
opam switch create 5.1.0
opam install sail -y
eval $(opam config env)
git clone https://github.com/riscv/sail-riscv.git
cd sail-riscv
make
ARCH=RV32 make
sudo ln -s "$(pwd)/c_emulator/riscv_sim_RV64" /usr/local/bin/riscv_sim_RV64
sudo ln -s "$(pwd)/c_emulator/riscv_sim_RV32" /usr/local/bin/riscv_sim_RV32
```Test:
```bash
sail --help
riscv_sim_RV32
riscv_sim_RV64
```# Running tests
Activate virtual environment:
```bash
source venv-riscof/bin/activate
```Then execute `runtests.sh`.