This paper presents EnergyAnalyzer, a code-level static analysis tool for estimating the energy consumption of embedded software based on statically predictable hardware events. The tool utilises techniques usually used for worst-case execution time (WCET) analysis together with bespoke energy models developed for two predictable architectures - the ARM Cortex-M0 and the Gaisler LEON3 - to perform energy usage analysis. EnergyAnalyzer has been applied in various use cases, such as selecting candidates for an optimised convolutional neural network, analysing the energy consumption of a camera pill prototype, and analysing the energy consumption of satellite communications software. The tool was developed as part of a larger project called TeamPlay, which aimed to provide a toolchain for developing embedded applications where energy properties are first-class citizens, allowing the developer to reflect directly on these properties at the source code level. The analysis capabilities of EnergyAnalyzer are validated across a large number of benchmarks for the two target architectures and the results show that the statically estimated energy consumption has, with a few exceptions, less than 1% difference compared to the underlying empirical energy models which have been validated on real hardware.
翻译:本文提出EnergyAnalyzer,一种基于可静态预测硬件事件、在代码层面估算嵌入式软件能耗的静态分析工具。该工具融合了通常用于最差情况执行时间(WCET)分析的技术,以及为两种可预测架构(ARM Cortex-M0与Gaisler LEON3)定制的能耗模型,以执行能耗分析。EnergyAnalyzer已在多种应用场景中投入使用,例如为优化后的卷积神经网络筛选候选架构、分析摄像头胶囊原型的能耗,以及分析卫星通信软件的能耗。该工具作为名为TeamPlay的大型项目的一部分而开发,该项目旨在提供一套将能耗属性作为一等公民的嵌入式应用开发工具链,使开发者能够在源代码层面直接考量这些属性。针对两种目标架构,EnergyAnalyzer的分析能力在大规模基准测试中得到了验证,结果表明:除少数例外情况外,静态估算的能耗与基于真实硬件验证的底层经验能耗模型相比,差异小于1%。