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%。