Magnificent! I am building a very similar HIP (Hypothetical Processor, reduced MIPS, created at my university for educational purposes) processor emulator with similar functionality. Still a long way to go, but I can definitely get inspired, since I imagined the very exact functions as here.
http://www.hipsim.org