Actually I was thinking you might want to look at :
avr_cycle_timer_register() in sim_cycle_timers.h -- it allows you to
register a function that will be called (as close as) after a number
of cycles you specify. With a judicious use of setjmp()/longjmp() you
could possibly "interrupt" the simavr core every few cycles to do your
own stuff, and let it resume when you want...
Just an idea, maybe it's worth checking it out...
Michael
to know how many cycles it ran, do :
avr_cycle_count_t old = avr->cycle();
avr_run(avr);
avr_cycle_count_t delta = avr->cycle - old;
Michael