'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 1:[1]

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. Also, it is needed to run the spike with the --log-commits flag.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ömer GÜZEL