add branch speculation image
[libreriscv.git] / 3d_gpu / spike_sv.mdwn
1 # Simple-V Spike emulator
2
3 example dev script (riscvdev.sh):
4
5 export RISCV="$HOME/src/riscv"
6 export PATH="$PATH:$RISCV/bin"
7
8 Needs riscv-tools, first
9
10 * git clone https://github.com/riscv/riscv-tools
11
12 once compiled check out sv versions of spike and tests:
13
14 * git clone https://git.libre-riscv.org/git/riscv-isa-sim.git
15 * cd risc-v-isa-sim
16 * git checkout -b sv
17 * cd ..
18 * git clone https://git.libre-riscv.org/git/riscv-tests.git
19 * cd riscv-tests
20 * git checkout -b sv
21
22 make install needed on the simulator for the tests to pick it up
23
24 To run the sv unit tests (requires $RISCV to be set correctly i think, or
25 at least riscv32/64-unknown-elf-gcc to be in the path)
26
27 * $ cd riscv-tests
28 * $ cd isa
29 * $ make
30 * $ make run
31
32 To override the fact that spike loads libspike\_main.so and other dynamic
33 libraries from /usr/local/lib (or other location in the path):
34
35 $ export LD_LIBRARY_PATH=`pwd`
36 $ ./spike pk ./a.out
37