add branch speculation image
[libreriscv.git] / 3d_gpu / spike_sv.mdwn
index bc74cd974a9c23e2695f872504e59c3225beab7d..462ba6a3c6f2dff0994a85d97ad2d51010ff7579 100644 (file)
@@ -1,11 +1,37 @@
 # 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
+