Changes to allow for free run in core between cycle timers
with per interval limiting.
Average cycle times drop by about upwards of 50-60+ cycles per emulated cycle,
dependant on usage.
sim_avr.h: struct avr_t changed.
added members run_cycle_count and run_cycle_limit.
run_cycle_count is number of cycles till next cycle timer.
run_cycle_limit is maximum number of cycles to run per interval.
sim_core.c: avr_run_one
* run_one_again label added at top.
* clause added at end which loops to run_one_again given that the core
is still in a cpu_Running state, run_cycle_count is greater than
cycles, and no interrups are pending.
sim_cycle_timers.c:
* static avr_cycle_timer_return_sleep_run_cycles_limited() added.
run_cycle_count is bounded to run_cycle_limit.
returns sleep count unbounded, preserving original behavior.
* static avr_cycle_timer_reset_sleep_run_cycles_limited() added.
sets new run_cycle_count based on present list of cycle timers.
* avr_cycle_timer_reset() changed.
run_cycle_count and run_cycle_limit is set to default values.
* avr_cycle_timer_register() changed.
* avr_cycle_timer_cancel() changed.
* avr_cycle_timer_process() changed.
call the relevant function to set/maintain run_cycle_count.
modified: simavr/sim/sim_avr.c
modified: simavr/sim/sim_avr.h
modified: simavr/sim/sim_cycle_timers.c
3 files changed: