qemu-e2k/hw/xtensa
Max Filippov 59a71f7578 target/xtensa: refactor CCOUNT/CCOMPARE
Xtensa cores may have a register (CCOUNT) that counts core clock cycles.
It may also have a number of registers (CCOMPAREx); when CCOUNT value
passes the value of CCOMPAREx, timer interrupt x is raised.

Currently xtensa target counts a number of completed instructions and
assumes that for CCOUNT one instruction takes one cycle to complete.
It calls helper function to update CCOUNT register at every TB end and
raise timer interrupts. This scheme works very predictably and doesn't
have noticeable performance impact, but it is hard to use with multiple
synchronized processors, especially with coming MTTCG.

Derive CCOUNT from the virtual simulation time, QEMU_CLOCK_VIRTUAL.
Use native QEMU timers for CCOMPARE timers, one timer for each register.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2017-01-15 13:01:55 -08:00
..
Makefile.objs hw/xtensa: remove extraneous xtensa_ prefix from file names 2014-06-29 02:32:41 +04:00
bootparam.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
pic_cpu.c target/xtensa: refactor CCOUNT/CCOMPARE 2017-01-15 13:01:55 -08:00
sim.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
xtfpga.c char: remove init callback 2016-10-24 15:27:20 +02:00