# Simple-V Spike emulator
+example dev script (riscvdev.sh):
+
+ export RISCV="$HOME/src/riscv"
+ export PATH="$PATH:$RISCV/bin"
+
Needs riscv-tools, first
+* git clone https://github.com/riscv/riscv-tools
+
+once compiled check out sv versions of spike and tests:
+
* git clone https://git.libre-riscv.org/git/riscv-isa-sim.git
* cd risc-v-isa-sim
* git checkout -b sv
* cd ..
* git clone https://git.libre-riscv.org/git/riscv-tests.git
-* cd risc-tests
+* cd riscv-tests
* git checkout -b sv
+
+make install needed on the simulator for the tests to pick it up
+
+To run the sv unit tests (requires $RISCV to be set correctly i think, or
+at least riscv32/64-unknown-elf-gcc to be in the path)
+
+* $ cd riscv-tests
+* $ cd isa
+* $ make
+* $ make run
+
+To override the fact that spike loads libspike\_main.so and other dynamic
+libraries from /usr/local/lib (or other location in the path):
+
+ $ export LD_LIBRARY_PATH=`pwd`
+ $ ./spike pk ./a.out
+