EnergyAnalyzer: Using Static WCET Analysis Techniques to Estimate the Energy Consumption of Embedded Applications

Authors Simon Wegener , Kris K. Nikov , Jose Nunez-Yanez , Kerstin Eder



PDF
Thumbnail PDF

File

OASIcs.WCET.2023.9.pdf
  • Filesize: 0.58 MB
  • 14 pages

Document Identifiers

Author Details

Simon Wegener
  • AbsInt Angewandte Informatik GmbH, Saarbrücken, Germany
Kris K. Nikov
  • University of Bristol, UK
Jose Nunez-Yanez
  • Linköping University, Sweden
Kerstin Eder
  • University of Bristol, UK

Acknowledgements

The authors like to thank Marcos Martinez de Alejandro, Nikos Fragoulis, Ali Sahafi, and Vangelis Vassalos for their work on the use cases and Heiko Falk and Shashank Jadhav for the integration of EnergyAnalyzer into WCC.

Cite AsGet BibTex

Simon Wegener, Kris K. Nikov, Jose Nunez-Yanez, and Kerstin Eder. EnergyAnalyzer: Using Static WCET Analysis Techniques to Estimate the Energy Consumption of Embedded Applications. In 21th International Workshop on Worst-Case Execution Time Analysis (WCET 2023). Open Access Series in Informatics (OASIcs), Volume 114, pp. 9:1-9:14, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)
https://doi.org/10.4230/OASIcs.WCET.2023.9

Abstract

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.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Software verification and validation
  • Software and its engineering → Automated static analysis
Keywords
  • Energy Modelling
  • Static Analysis
  • Gaisler LEON3
  • ARM Cortex-M0

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. ARM Ltd. The ARM Cortex-M0 processor. https://developer.arm.com/products/processors/cortex-m/cortex-m0. Accessed: 2018-08-14.
  2. Cobham Gaisler AB. GR712RC Dual-Core LEON3-FT Development board. https://www.gaisler.com/index.php/products/boards/gr712rc-board. Accessed: 2018-09-11.
  3. Cobham Gaisler AB. LEON3FT Fault-tolerant processor. https://www.gaisler.com/index.php/products/processors/leon3ft. Accessed: 2018-09-11.
  4. Cobham Gaisler AB. GRLIB IP Core User’s Manual, 2019. URL: https://www.gaisler.com/products/grlib/grip.pdf.
  5. Martin Cochet, Guillaume Bonnechere, Jean-Marc Daveau, Fady Abouzeid, and Philippe Roche. Implementing the LEON3 Statistics Unit in 28nm FD-SOI: Power Estimation by Activity Proxy, 2016. Google Scholar
  6. Andreas Ermedahl. A Modular Tool Architecture for Worst-Case Execution Time Analysis. PhD thesis, Uppsala University, Sweden, 2003. URL: http://nbn-resolving.de/urn:nbn:se:uu:diva-3502.
  7. Zbigniew Chamski et al. The Thumbulator Git repository modified for collecting performance monitoring counters for the STM32F0-Discovery board. Branch: prefetch-model, tag: teamplay-D4.5. URL: https://github.com/PicoPET/thumbulator-stm32f0x.git.
  8. Heiko Falk and Paul Lokuciejewski. A compiler framework for the reduction of worst-case execution times. Real-Time Systems, 46(2):251-300, 2010. Google Scholar
  9. Kyriakos Georgiou, Steve Kerrison, Zbigniew Chamski, and Kerstin Eder. Energy transparency for deeply embedded programs. ACM Trans. Archit. Code Optim., 14(1), March 2017. URL: https://doi.org/10.1145/3046679.
  10. AbsInt Angewandte Informatik GmbH. XTC Language Specification, Version 2.7. https://www.absint.com/xtc/xtc-specification.pdf. Accessed: 2020-01-13.
  11. Xinfei Guo, Vaibhav Verma, Patricia Gonzalez-Guerrero, and Mircea R Stan. When “things” get older: exploring circuit aging in iot applications. In 2018 19th International Symposium on Quality Electronic Design (ISQED), pages 296-301. IEEE, 2018. Google Scholar
  12. Christopher A. Healy, David B. Whalley, and Marion G. Harmon. Integrating the timing analysis of pipelining and instruction caching. In 16th IEEE Real-Time Systems Symposium, Palazzo dei Congressi, Via Matteotti, 1, Pisa, Italy, December 4-7, 1995, Proceedings, pages 288-297. IEEE Computer Society, 1995. URL: https://doi.org/10.1109/REAL.1995.495218.
  13. Ramkumar Jayaseelan, Tulika Mitra, and Xianfeng Li. Estimating the worst-case energy consumption of embedded software. In 12th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS 2006), 4-7 April 2006, San Jose, California, USA, pages 81-90. IEEE Computer Society, 2006. URL: https://doi.org/10.1109/RTAS.2006.17.
  14. Michael H. Kutner, Chris Nachtsheim, John Neter, and William Li. Applied linear statistical models. McGraw-Hill Irwin, 2005. Google Scholar
  15. Charles L. Lawson and Richard J. Hanson. Solving least squares problems. SIAM, 1995. Google Scholar
  16. Jeremy Morse, Steve Kerrison, and Kerstin Eder. On the limitations of analyzing worst-case dynamic energy of processing. ACM Trans. Embed. Comput. Syst., 17(3):59:1-59:22, February 2018. URL: https://doi.org/10.1145/3173042.
  17. Krastin Nikov and José L. Núñez-Yáñez. Intra and inter-core power modelling for single-isa heterogeneous processors. Int. J. Embed. Syst., 12(3):324-340, 2020. URL: https://doi.org/10.1504/IJES.2020.107046.
  18. Krastin Nikov, José L. Núñez-Yáñez, and Matthew Horsnell. Evaluation of hybrid run-time power models for the ARM big.little architecture. In Eli Bozorgzadeh, João M. P. Cardoso, Rui Abreu, and Seda Ogrenci Memik, editors, 13th IEEE International Conference on Embedded and Ubiquitous Computing, EUC 2013, Porto, Portugal, October 21-23, 2015, pages 205-210. IEEE Computer Society, 2015. URL: https://doi.org/10.1109/EUC.2015.32.
  19. Kris Nikov, Kyriakos Georgiou, Zbigniew Chamski, Kerstin Eder, and José L. Núñez-Yáñez. Accurate energy modelling on the cortex-m0 processor for profiling and static analysis. In 29th IEEE International Conference on Electronics, Circuits and Systems, ICECS 2022, Glasgow, United Kingdom, October 24-26, 2022, pages 1-4. IEEE, 2022. URL: https://doi.org/10.1109/ICECS202256217.2022.9971086.
  20. Kris Nikov, Marcos Martínez, Simon Wegener, José L. Núñez-Yáñez, Zbigniew Chamski, Kyriakos Georgiou, and Kerstin Eder. Robust and accurate fine-grain power models for embedded systems with no on-chip PMU. IEEE Embed. Syst. Lett., 14(3):147-150, 2022. URL: https://doi.org/10.1109/LES.2022.3147308.
  21. Jose Nunez-Yanez and Geza Lore. Enabling accurate modeling of power and energy consumption in an ARM-based System-on-Chip. Microprocessors and Microsystems, 37(3):319-332, 2013. Google Scholar
  22. James Pallister, Simon J. Hollis, and Jeremy Bennett. BEEBS: open benchmarks for energy measurements on embedded platforms. CoRR, abs/1308.5174, 2013. URL: https://arxiv.org/abs/1308.5174.
  23. James Pallister, Steve Kerrison, Jeremy Morse, and Kerstin Eder. Data dependent energy modeling for worst case energy consumption analysis. In Proceedings of the 20th International Workshop on Software and Compilers for Embedded Systems, SCOPES 2017, pages 51-59, New York, NY, USA, 2017. Association for Computing Machinery. URL: https://doi.org/10.1145/3078659.3078666.
  24. Santhosh Kumar Rethinagiri, Oscar Palomar, Rabie Ben Atitallah, Smail Niar, Osman Unsal, and Adrian Cristal Kestelman. System-level power estimation tool for embedded processor based platforms. In Proceedings of the 6th Workshop on Rapid Simulation and Performance Evaluation: Methods and Tools, pages 1-8, 2014. Google Scholar
  25. Rance Rodrigues, Arunachalam Annamalai, Israel Koren, and Sandip Kundu. A study on the use of performance counters to estimate power in microprocessors. IEEE Transactions on Circuits and Systems II: Express Briefs, 60(12):882-886, 2013. Google Scholar
  26. Benjamin Rouxel, Christopher Brown, Emad Ebeid, Kerstin Eder, Heiko Falk, Clemens Grelck, Jesper Holst, Shashank Jadhav, Yoann Marquer, Marcos Martinez de Alejandro, Kris Nikov, Ali Sahafi, Ulrik Pagh Schultz Lundquist, Adam Seewald, Vangelis Vassalos, Simon Wegener, and Olivier Zendra. The teamplay project: Analysing and optimising time, energy, and security for cyber-physical systems. In Design, Automation & Test in Europe Conference & Exhibition, DATE 2023, Antwerp, Belgium, April 17-19, 2023, pages 1-6. IEEE, 2023. URL: https://doi.org/10.23919/DATE56975.2023.10137198.
  27. Adam Seewald, Ulrik Pagh Schultz, Emad Ebeid, and Henrik Skov Midtiby. Coarse-grained computation-oriented energy modeling for heterogeneous parallel embedded systems. International Journal of Parallel Programming, 49(2):136-157, 2021. Google Scholar
  28. Volkmar Sieh, Robert Burlacu, Timo Hönig, Heiko Janker, Phillip Raffeck, Peter Wägemann, and Wolfgang Schröder-Preikschat. An end-to-end toolchain: From automated cost modeling to static WCET and WCEC analysis. In 20th IEEE International Symposium on Real-Time Distributed Computing, ISORC 2017, Toronto, ON, Canada, May 16-18, 2017, pages 158-167. IEEE Computer Society, 2017. URL: https://doi.org/10.1109/ISORC.2017.10.
  29. STMicroelectronics. STM32F030x4/x6/x8/xC and STM32F070x6/xB advanced ARM-based 32-bit MCUs - Reference Manual. Accessed: 2020-12-28. URL: https://www.st.com/resource/en/reference_manual/dm00091010-stm32f030x4x6x8xc-and-stm32f070x6xb-advanced-armbased-32bit-mcus-stmicroelectronics.pdf.
  30. Henrik Theiling, Christian Ferdinand, and Reinhard Wilhelm. Fast and precise WCET prediction by separated cache and path analyses. Real-Time Systems, 18(2/3):157-179, 2000. URL: https://doi.org/10.1023/A:1008141130870.
  31. Peter Wägemann, Christian Dietrich, Tobias Distler, Peter Ulbrich, and Wolfgang Schröder-Preikschat. Whole-system worst-case energy-consumption analysis for energy-constrained real-time systems. In Sebastian Altmeyer, editor, 30th Euromicro Conference on Real-Time Systems, ECRTS 2018, July 3-6, 2018, Barcelona, Spain, volume 106 of LIPIcs, pages 24:1-24:25. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018. URL: https://doi.org/10.4230/LIPIcs.ECRTS.2018.24.
  32. Peter Wägemann, Tobias Distler, Timo Hönig, Heiko Janker, Rüdiger Kapitza, and Wolfgang Schröder-Preikschat. Worst-case energy consumption analysis for energy-constrained embedded systems. In 27th Euromicro Conference on Real-Time Systems, ECRTS 2015, Lund, Sweden, July 8-10, 2015, pages 105-114. IEEE Computer Society, 2015. URL: https://doi.org/10.1109/ECRTS.2015.17.
  33. Matthew J Walker, Stephan Diestelhorst, Andreas Hansson, Anup K Das, Sheng Yang, Bashir M Al-hashimi, and Geoff V Merrett. Accurate and Stable Run-Time Power Modeling for Mobile and Embedded CPUs. Ieee Transactions on Computer Aided Design of Integrated Circuits and Systems, 36(1):1-14, 2017. URL: https://doi.org/10.5258/SOTON/393673.
  34. Reinhard Wilhelm, Jakob Engblom, Andreas Ermedahl, Niklas Holsti, Stephan Thesing, David Whalley, Guillem Bernat, Christian Ferdinand, Reinhold Heckmann, Tulika Mitra, Frank Mueller, Isabelle Puaut, Peter Puschner, Jan Staschulat, and Per Stenström. The worst-case execution-time problem - overview of methods and survey of tools. ACM Transactions on Embedded Computing Systems, 7(3):36:1-36:53, May 2008. URL: https://doi.org/10.1145/1347375.1347389.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail