How can CAS simulators like PTLsim achieve cycle accurate simulation of x86 hardware?

前端 未结 3 786
你的背包
你的背包 2021-01-20 03:11

Can somebody enlighten me how does CAS software like http://www.ptlsim.org/ work? How do they achieve cycle accuracy if there is neither information how many cycles are used

3条回答
  •  青春惊慌失措
    2021-01-20 03:20

    On the site you linked there are statements such as;

    PTLsim is a state of the art cycle accurate microprocessor simulator and virtual machine for the x86 and x86-64 instruction sets.

    and

    It runs directly on the same platform it is simulating (an x86-64 or x86 machine running Linux)

    It is not clear to me then how this differs from any other x86 Virtual machine technology such as QEMU, VirtualBox, VMWare or Virtual PC, which would be cycle accurate by virtue of actually directly running instructions on the hardware (as well as running at core speeds). Is it a simulator or a VM? In my mind they are not the same thing; bochs for example is a simulator rather than a VM, PTLsim appears to be somewhere in-between perhaps?

提交回复
热议问题