Difference between RISCV SPIKE simulator and GNU simulator

Hi,

When i build riscv-gnu-toolchain, it created one binary with name riscv32-unknown-elf-run. Is this GNU simulator? I saw that i could easily run a c program which is built using riscv32-unknown-elf-gcc on this simulator. Now my question is what is the difference between SPIKE simulator or any other RISCV simulators and this GNU simulator? are they both implement functional model of RISCV ISA ? I am litle confused here. Can u give some clarity to me ?

There are dozens of RISC-V simulators. They are all slightly different. They all run riscv code. The riscv32-unknown-elf-run is a gdb sim RISC-V port, and works the same as other gdb simulators. It isn’t upstream because we have two competing gdb sim ports. The spike simulator is a bare metal simulator that can run an OS. The gdb simulator can only run statically linked applications.

Basically, spike is the best simulator for hardware developers. qemu is the best simulator for software developers. The gdb sim is maybe best if you are familiar with other gdb sims, and want access to features that gdb sims support.