2021-01-15 04:16:47 +00:00
# riscv-wally
Configurable RISC-V Processor
2021-10-11 15:13:15 +00:00
Wally is a 5-stage pipelined processor configurable to support all the standard RISC-V options, incluidng RV32/64, A, C, F, D, and M extensions, FENCE.I, and the various privileged modes and CSRs. It is written in SystemVerilog. It passes the RISC-V Arch Tests and Imperas tests. As of October 2021, it boots the first 10 million instructions of Buildroot Linux.
2021-10-11 15:50:44 +00:00
To use Wally on Linux:
2021-10-11 15:13:15 +00:00
2021-10-18 18:17:24 +00:00
```
2021-12-01 02:26:49 +00:00
git clone https://github.com/davidharrishmc/riscv-wally --recurse-submodules
2021-10-11 15:50:44 +00:00
cd riscv-wally
2021-11-03 20:30:21 +00:00
cd addins
2021-10-18 18:17:24 +00:00
cd riscv-isa-sim
2021-11-03 20:49:07 +00:00
*** replace these with a copy from ../install/F and ../install/D containing the Makefile.includes already updated
2021-10-27 17:41:37 +00:00
cp -r arch_test_target/spike/device/rv32i_m/I arch_test_target/spike/device/rv32i_m/F
< edit arch_test_target / spike / device / rv32i_m / F / Makefile . include line 35 and change --isa = rv32i to --isa = rv32if >
2021-11-03 20:40:23 +00:00
cp -r arch_test_target/spike/device/rv64i_m/I arch_test_target/spike/device/rv64i_m/D
2021-10-30 14:34:53 +00:00
< edit arch_test_target / spike / device / rv64i_m / D / Makefile . include line 35 and change --isa = rv64i to --isa = rv64id >
2021-10-18 18:17:24 +00:00
mkdir build
cd build
set RISCV=/cad/riscv/gcc/bin (or whatever your path is)
../configure --prefix=$RISCV
2021-10-18 20:39:40 +00:00
make (this will take a while to build SPIKE)
2021-10-18 18:17:24 +00:00
sudo make install
2021-10-18 20:39:40 +00:00
cd ../../riscv-arch-test
cp ../riscv-isa-sim/arch_test_target/spike/Makefile.include .
edit Makefile.include
2021-10-20 17:49:41 +00:00
change line with TARGETDIR to /home/harris/riscv-wally/addins/riscv-isa-sim/arch_test_target (or whatever your path is)
2021-10-18 20:39:40 +00:00
add line export RISCV_PREFIX = riscv64-unknown-elf- # this might not be needed if you have 32-bit versions of the riscv gcc compiler built separately
make
make XLEN=32
2021-10-18 20:43:10 +00:00
exe2memfile.pl work/*/*/*.elf # converts ELF files to a format that can be read by Modelsim
2021-11-03 20:30:21 +00:00
cd ../../tests
cd imperas-riscv-tests
make
cd ../wally-riscv-arch-test
make
make XLEN=32
exe2memfile.pl work/*/*/*.elf # converts ELF files to a format that can be read by Modelsim
2021-11-17 18:39:18 +00:00
cd ../linux-testgen/linux-testvectors
2021-10-27 20:45:56 +00:00
./tvLinker.sh
2021-10-18 18:17:24 +00:00
```
2021-10-11 15:50:44 +00:00
Notes:
Eventually download imperas-riscv-tests separately
Move our custom tests to another directory
2021-10-18 23:23:22 +00:00
Eventually replace exe2memfile.pl with objcopy