The sPEEDO project was a local strawman API proposal for application code to read off its own energy use. »Fine-grained Energy/Power Instrumentation for Software-level Efficiency Optimization
If you invoke the Prazor ./configure --with-speedo and with TLM_POWER3 included, you can read off the energy modelled by POWER3 through the spEEDO register file which is memory mapped.
// Write a simple unit value to do a basic checkpoint checkpoint, copying live CTX0 to CTX1. SPEEDO_CHKPT(0); energy_t e = READ_SPEEDO_CTX1(SPEEDO_CTX_REG_GLOBAL_ENERGY);
The energyshim.c file can either read backdoor registers on the virtual platform or else read from the real probe on the real board.
50: (C) 2008-18, DJ Greaves, University of Cambridge, Computer Laboratory. |