|
From: | John Regehr |
Subject: | RE: [avr-gcc-list] Any SimulAVR or avrtest users out there? |
Date: | Thu, 12 Mar 2009 16:22:50 -0600 (MDT) |
User-agent: | Alpine 1.00 (DEB 882 2007-12-20) |
For the sake of discussion here, what makes it very easy to extend?
Avrora makes it easy to write "monitors" which are Java classes that can receive callbacks when many interesting kinds of simulator events occur: memory operations, instruction execution, interrupts, etc. A majority of the little simulator hacks that we end up needing turn out to be conveniently expressible as monitors. You can drop in a monitor without even recompiling the simulator. There are other things I'm leaving out, but the monitor interface is the main thing I used.
A few random monitors I wrote or hacked on were: - a simple printf, triggered by a store to a magic memory location - terminate simulator on a "break" instruction - keep track of maximum stack depth - take timing measurements between specified starting and stopping addresses - profiling the kinds of values stored in regions of RAMThere are a bunch more. Obviously you can hack this kind of functionality into any simulator, but here it is easy and convenient and you don't clutter up the simulator core.
John
[Prev in Thread] | Current Thread | [Next in Thread] |