Bringing Energy Information to the Instruction Set - Bonotto, Bruno; Wanner, Lucas; Pannain, Ricardo; Azevedo, Rodolfo (Anais do Simpósio Brasileiro de Engenharia de Sistemas Computacionais (SBESC), 2020)
In the last decades, many advances have been made in clock frequencies and silicon integration. With the increase in energy consumption, energy-aware computing has become a topic of great interest to the community. A wide variety of works focus on software techniques to reduce energy consumption when a device's battery is running out. Even then, by not knowing how much energy is available on a device 1) some routines can start and do not finish due to an energy outage, 2) non-critical routines can be called even when the device's battery is running out, and 3) critical and energy-intensive routines can quickly drain the rest of the device's battery, even though these routines may have an alternative implementation (more simplified or less accurate). The current way of collecting energy information is hardware and Operating System dependant and may take too much time. This work proposes a new branch instruction to the RISC-V instruction set architecture, called Branch if Energy Low (BEL). Using a single instruction, compilers/software developers can evaluate if the available energy is bellow a threshold and branch to routines with less energy consumption. BEL can be used on intermittent devices and approximate computing. We evaluate BEL on approximate computing benchmark applications and showed that it is possible to reaches an average of 52.32% energy savings with negligible 0.04% of accuracy degradation.