On 8 September 2017 at 08:41, Sergey Smolov <smo...@ispras.ru> wrote:
> But what if I like to track guest hardware cycles? I run the same program on
> QEMU and RTL model of MIPS microprocessor, and I want to compare simulation
> traces. I expect, that emulation will start from 0 tick in both cases, at
> least.

Broadly, you can't, because QEMU is not a cycle accurate emulator.
(For 21st century CPUs, cycle accurate emulation that isn't just
"run the RTL" is pretty near to impossible for practical purposes
anyway.) If you're using QEMU's icount mode then cpu_get_ticks()
will I think get you number of instructions executed; that's as
good as you're going to get, I'm afraid.

Last time I wanted to do comparison of simulation traces I just
compared the sequence of instructions executed, without worrying
about trying to compare against the other simulation's notional
clock cycle count as well.

thanks
-- PMM

Reply via email to