bucaps / marss-riscv

TinyEMU based full system cycle-level micro-architectural research simulator for single-core RISC-V systems
MIT License
143 stars 23 forks source link

Is the use of terms 'simulation' and 'emulation' antithetical ? #4

Closed anujfalcon closed 5 years ago

anujfalcon commented 5 years ago

According to quick google search, simulation means to get the results without caring about how it is produced, for a particular system configuration and it's way more faster than emulation (unless the simulation is purposefully resource constrained) - where the method for producing results is also accurately simulated (The hardware details) and it's usually way more slower, for a given host configuration.

But according to the readme doc, "By default, guest boots in emulation mode. To start in simulation mode run with -simstart command line option."

But the default boot seems to act way more faster than the simulation mode.

Can somebody clear this confusion on the definition of simulation and emulation in the context of marss-riscv and the worldly definition?

gkothar1 commented 5 years ago

In the context of MARSS-RISCV, emulation or native mode means basically just fetch and execute a RISC-V instruction (Not possible to record cycle by cycle performance) which runs quite fast.

However, in the simulation mode, the fetched RISC-V instructions are put through the simulated CPU pipeline which records performance stats as the programs run, hence runs quite slow compared to the emulation mode.

I hope this clears your confusion. Let us know if you need more clarification on this.