skip to main content
research-article

Time Measurement and Control Blocks for Bare-Metal C++ Applications

Published:13 May 2021Publication History
Skip Abstract Section

Abstract

Precisely timed execution of resource constrained bare-metal applications is difficult, because the embedded software developer usually has to implement and check the timeliness of the executed application through manual interaction with timers or counters. In the scope of this work, we propose a combined timing specification and concept for time annotation and control blocks in C++. Our proposed blocks can be used to measure and profile software block execution time. Furthermore, it can be used to control and enforce the software time behavior at runtime. After the application of these time blocks, a trace-based verification against the block-based timing specification can be performed to obtain evidence on the correct implementation and usage of the time blocks on the target platform. We have implemented our time block concept in a C++ library and tested it on an ARM Cortex A9 bare-metal platform. The combined usage of timing specification and our time block library has been successfully evaluated on a critical flight-control software for a multi-rotor system.

References

  1. Tesnim Abdellatif, Jacques Combaz, and Joseph Sifakis. 2013. Rigorous implementation of real-time systems–from theory to application. Math. Struct. Comput. Sci. 23 (2013), 882--914. DOI:https://doi.org/10.1017/S096012951200028XGoogle ScholarGoogle ScholarCross RefCross Ref
  2. Eckard Böde, Matthias Büker, Werner Damm, Günter Ehmen, Martin Fränzle, Sebastian Gerwinn, Thomas Goodfellow, Kim Grüttner, Bernhard Josko, Björn Koopmann, Thomas Peikenkamp, Frank Poppen, Philipp Reinkemeier, Michael Siegel, and Ingo Stierand. 2017. Design paradigms for multi-layer time coherency in ADAS and automated driving (MULTIC). In FAT-Schriftenreihe 302. Forschungsvereinigung Automobiltechnik e.V. (FAT).Google ScholarGoogle Scholar
  3. Eckard Böde, Werner Damm, Günter Ehmen, Martin Fränzle, Kim Grüttner, Philipp Ittershagen, Bernhard Josko, Björn Koopmann, Frank Poppen, Michael Siegel, and Ingo Stierand. 2019. MULTIC-Tooling. In FAT-Schriftenreihe 316. Forschungsvereinigung Automobiltechnik e.V. (FAT).Google ScholarGoogle Scholar
  4. F. Bruns, P. Ittershagen, and K. Grüttner. 2019. Time measurement and control blocks for bare-metal C++ applications. In Proceedings of the 2019 Forum for Specification and Design Languages (FDL’19). 1--8. DOI:https://doi.org/10.1109/FDL.2019.8876898Google ScholarGoogle ScholarCross RefCross Ref
  5. Bjorn Bäuchle. 2014. std::chrono—Typesafe Time Keeping in C++. Retrieved from https://pm.fias.science/attachments/download/1496/chrono.pdf.Google ScholarGoogle Scholar
  6. Dai Bui, Edward Lee, Isaac Liu, Hiren Patel, and Jan Reineke. 2011. Temporal isolation on multiprocessing architectures. In Proceedings of the 48th Design Automation Conference. 274--279.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. SAFEPOWER Consortium. 2017. D4.6 Final Cross-domain Public Demonstrator. Technical Report. OFFIS–Institute for Information Technology. Retrieved from http://safepower-project.eu/consultant_project/mortgage-advisor-2-2/.Google ScholarGoogle Scholar
  8. Mikel Cordovilla, Frédéric Boniol, Julien Forget, Eric Noulard, and Claire Pagetti. 2011. Developing critical embedded systems on multicore architectures: The Prelude-SchedMCore toolset. In Proceedings of the 19th International Conference on Real-Time and Network Systems. Irccyn.Google ScholarGoogle Scholar
  9. Keryan Didier, Dumitru Potop-Butucaru, Guillaume Iooss, Albert Cohen, Jean Souyris, Philippe Baufreton, and Amaury Graillat. 2019. Correct-by-construction parallelization of hard real-time avionics applications on off-the-shelf predictable hardware. Trans. Arch. Code Optim. 16, 3 (2019), 1--27. DOI:https://doi.org/10.1145/3328799Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Heiko Falk and Paul Lokuciejewski. 2010. A compiler framework for the reduction of worst-case execution times. Real-Time Syst. 46, 2 (2010), 251--300. DOI:https://doi.org/10.1007/s11241-010-9101-xGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  11. GeeksforGeeks. 2017. Chrono in C++. Retrieved from https://www.geeksforgeeks.org/chrono-in-c/.Google ScholarGoogle Scholar
  12. Narain Gehani and Krithi Ramamritham. 1991. Real-time Concurrent C: A language for programming dynamic real-time systems. Real-Time Syst. 3, 4 (1991), 377--405. DOI:https://doi.org/10.1007/BF00365999Google ScholarGoogle ScholarCross RefCross Ref
  13. Michael González Harbour. 2006. Programming Real-time Systems with C/C++ and POSIX. Retrieved from https://www-users.cs.york.ac.uk/burns/papers/c-posix.pdf.Google ScholarGoogle Scholar
  14. Thomas A. Henzinger. 2000. The Theory of Hybrid Automata. Springer, Berlin, 265--292. DOI:https://doi.org/10.1007/978-3-642-59615-5_13Google ScholarGoogle ScholarCross RefCross Ref
  15. Thomas A. Henzinger, Benjamin Horowitz, and Christoph Meyer Kirsch. 2001. Giotto: A time-triggered language for embedded programming. In Embedded Software. Springer, Berlin, 166--184. DOI:https://doi.org/10.1007/3-540-45449-7_12Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Thomas A. Henzinger and Christoph M. Kirsch. 2007. The embedded machine: Predictable, portable real-time code. ACM Trans. Program. Lang. Syst. 29, 6 (2007), 33–es. DOI:https://doi.org/10.1145/1286821.1286824Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hermann Kopetz and Günther Bauer. 2003. The time-triggered architecture. Proc. IEEE 91, 1 (2003), 112--126. DOI:https://doi.org/10.1109/JPROC.2002.805821Google ScholarGoogle ScholarCross RefCross Ref
  18. Christopher Kormanyos. 2013. Real-Time C++ - Efficient Object-Oriented and Template Microcontroller Programming. Springer. 1–357 pages. DOI:https://doi.org/10.1007/978-3-642-34688-0Google ScholarGoogle Scholar
  19. E. Lee, J. Reineke, and M. Zimmer. 2017. Abstract PRET machines. In Proceedings of the 2017 IEEE Real-Time Systems Symposium (RTSS’17). 1--11. DOI:https://doi.org/10.1109/RTSS.2017.00041Google ScholarGoogle ScholarCross RefCross Ref
  20. Matthieu Lemerre, Vincent David, Christophe Aussaguès, and Guy Vidal-Naquet. 2010. An introduction to time-constrained automata. Electr. Proc. Theor. Comput. Sci. 38 (2010), 83--98. DOI:https://doi.org/10.4204/eptcs.38.9Google ScholarGoogle ScholarCross RefCross Ref
  21. John McDougall. 2014. Simple AMP: Bare-Metal System Running on Both Cortex-A9 Processors (XAPP1079). Technical Report. Xilinx Inc. Retrieved from http://caxapa.ru/thumbs/565353/xapp1079-amp-bare-metal-cortex-a9.pdf.Google ScholarGoogle Scholar
  22. Saranya Naatarajan and David Broman. 2018. Timed C: An Extension to the C Programming Language for Real-Time Systems. In Proceedings of IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS’18). DOI:https://doi.org/10.1109/RTAS.2018.00031Google ScholarGoogle ScholarCross RefCross Ref
  23. Matthias C. Schabel and Steven Watanabe. 2020. The Boost.Units library. Retrieved from https://github.com/boostorg/units.Google ScholarGoogle Scholar
  24. Ira Weinstein and Mike Frankel. 1992. Timing in ada. In Proceedings of the Embedded Systems Conference (1992).Google ScholarGoogle Scholar
  25. Juan Zamorano, Alejandro Alonso, José Antonio Pulido, and Juan Antonio de la Puente. 2004. Implementing execution-time clocks for the ada ravenscar profile. In Proceedings of the Reliable Software Technologies: Ada-Europe 2004, Albert Llamosí and Alfred Strohmeier (Eds.). Springer, Berlin, 132--143. DOI:https://doi.org/10.1007/978-3-540-24841-5_10Google ScholarGoogle Scholar
  26. Juan Zamorano, José F. Ruiz, and Juan Antonio de la Puente. 2001. Implementing Ada.Real Time.Clock and absolute delays in real-time kernels. In Proceedings of the Reliable SoftwareTechnologies: Ada-Europe 2001. Springer, Berlin, 317--327. DOI:https://doi.org/10.1007/3-540-45136-6_25Google ScholarGoogle Scholar

Index Terms

  1. Time Measurement and Control Blocks for Bare-Metal C++ Applications

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Article Metrics

              • Downloads (Last 12 months)16
              • Downloads (Last 6 weeks)1

              Other Metrics

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader

            HTML Format

            View this article in HTML Format .

            View HTML Format
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!