bare-metalspike

How to see only changing register after each instruction in Spike?


I am using spike bare metal mode to run the compiled code for RISC-V. I want to see or save (in a text file) the register only which is changed after each instruction. Is it possible to do it and how? If it is not possible, how can I save all the registers (in a text file) after each instruction?


Solution

  • After I searched I found the answer on the main GitHub page in issues section. It is answered in this question. It is needed to build the spike by using the --enable-commitlog flag in older versions. Also, it is needed to run the spike with the --log-commits flag.