Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

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

Published: 13 May 2021 Publication History

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.
[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).
[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).
[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.
[5]
Bjorn Bäuchle. 2014. std::chrono—Typesafe Time Keeping in C++. Retrieved from https://pm.fias.science/attachments/download/1496/chrono.pdf.
[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.
[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/.
[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.
[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.
[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.
[11]
GeeksforGeeks. 2017. Chrono in C++. Retrieved from https://www.geeksforgeeks.org/chrono-in-c/.
[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.
[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.
[14]
Thomas A. Henzinger. 2000. The Theory of Hybrid Automata. Springer, Berlin, 265--292.
[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.
[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.
[17]
Hermann Kopetz and Günther Bauer. 2003. The time-triggered architecture. Proc. IEEE 91, 1 (2003), 112--126.
[18]
Christopher Kormanyos. 2013. Real-Time C++ - Efficient Object-Oriented and Template Microcontroller Programming. Springer. 1–357 pages.
[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.
[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.
[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.
[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).
[23]
Matthias C. Schabel and Steven Watanabe. 2020. The Boost.Units library. Retrieved from https://github.com/boostorg/units.
[24]
Ira Weinstein and Mike Frankel. 1992. Timing in ada. In Proceedings of the Embedded Systems Conference (1992).
[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.
[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.

Cited By

View all
  • (2023)RISC-V Timing-Instructions for Open Time-Triggered Architectures2023 53rd Annual IEEE/IFIP International Conference on Dependable Systems and Networks Workshops (DSN-W)10.1109/DSN-W58399.2023.00058(211-214)Online publication date: Jun-2023

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Embedded Computing Systems
ACM Transactions on Embedded Computing Systems  Volume 20, Issue 4
Special Issue on FDL2019
July 2021
256 pages
ISSN:1539-9087
EISSN:1558-3465
DOI:10.1145/3458852
  • Editor:
  • Tulika Mitra
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Journal Family

Publication History

Published: 13 May 2021
Accepted: 01 November 2020
Revised: 01 September 2020
Received: 01 February 2020
Published in TECS Volume 20, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Time measurement
  2. real-time bare-metal application
  3. time control blocks
  4. timing annotations

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • German Ministry of Education and Research (BMBF)

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)21
  • Downloads (Last 6 weeks)5
Reflects downloads up to 12 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)RISC-V Timing-Instructions for Open Time-Triggered Architectures2023 53rd Annual IEEE/IFIP International Conference on Dependable Systems and Networks Workshops (DSN-W)10.1109/DSN-W58399.2023.00058(211-214)Online publication date: Jun-2023

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media