
1) Find the complete riscv-tools here: https://github.com/riscv/riscv-tools

2) 
	a) Download riscv-isa-sim from here: https://github.com/riscv/riscv-isa-sim/tree/d48f107dba6a96fb827cb47fdf290261feadeb35
	b) Extract and rename the folder to riscv-isa-sim
	c) Copy the patch spikeTrace.patch to the folder containing riscv-isa-sim
	d) Apply patch to riscv-isa-sim using: patch -p0 -R < spikeTrace.patch
	
3) Set the environment using the commands in the file setEnv

4) Building: ./build.sh

5) Cross-compile a C program using riscv64-unkonown-elf-gcc

6) Run: ./runSpike <benchmark> <args>
In the file runSpike.sh you can set the -t option to take the traces and -N<n> to generate a trace of n million instructions

Note: The spike proxy-kernel is only configured to take single-core traces. 
