Programming Time-Predictable Processors with Lingua Franca

Authors Magnus Mæhlum , Erling Rennemo Jellum , Shaokai Lin , Marten Lohstroh , Martin Schoeberl , Sverre Hendseth , Edward A. Lee



PDF
Thumbnail PDF

File

OASIcs.NG-RES.2025.1.pdf
  • Filesize: 0.91 MB
  • 13 pages

Document Identifiers

Author Details

Magnus Mæhlum
  • Norwegian University of Science and Technology, Trondheim, Norway
Erling Rennemo Jellum
  • University of California, Berkeley, CA, USA
Shaokai Lin
  • University of California, Berkeley, CA, USA
Marten Lohstroh
  • University of California, Berkeley, CA, USA
Martin Schoeberl
  • Technical University of Denmark, Denmark
Sverre Hendseth
  • Norwegian University of Science and Technology, Trondheim, Norway
Edward A. Lee
  • University of California, Berkeley, CA, USA

Cite As Get BibTex

Magnus Mæhlum, Erling Rennemo Jellum, Shaokai Lin, Marten Lohstroh, Martin Schoeberl, Sverre Hendseth, and Edward A. Lee. Programming Time-Predictable Processors with Lingua Franca. In Sixth Workshop on Next Generation Real-Time Embedded Systems (NG-RES 2025). Open Access Series in Informatics (OASIcs), Volume 128, pp. 1:1-1:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2025) https://doi.org/10.4230/OASIcs.NG-RES.2025.1

Abstract

Precision-timed (PRET) machines are an alternative to modern processors that provide precise control over the timing of software execution. This paper describes a platform for developing predictable real-time embedded systems that pair PRET machines with Lingua Franca (LF), a recent reactor-based coordination language with temporal semantics. Specifically, we port LF to FlexPRET, a PRET machine with flexible hardware thread scheduling. We evaluate single-threaded LF with a tight control loop style application on four embedded platforms, including the FlexPRET. The results reveal the underlying platform’s timing variability and how LF plus FlexPRET can remedy this timing variability. Finally, we compare single-threaded to multithreaded LF, again concerning timing. The four embedded platforms used are FlexPRET (bare-metal), RP2040 (bare-metal), nRF52 (with Zephyr), and Raspberry Pi 3b+ (with Linux). Our results indicate that FlexPRET with LF is attractive when precise timing is essential.

Subject Classification

ACM Subject Classification
  • Computer systems organization → Embedded and cyber-physical systems
  • Computing methodologies → Distributed programming languages
Keywords
  • Real-time systems
  • time-predictable architecture
  • embedded system
  • coordination language

Metrics

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

References

  1. AUTOSAR. Specification of timing extensions. AUTOSAR CP Release 4.4.0, October 2018. Google Scholar
  2. M. Delvai, W. Huber, P. Puschner, and A. Steininger. Processor support for temporal predictability - the SPEAR design example. In 15th Euromicro Conference on Real-Time Systems, 2003. Proceedings., pages 169-176, 2003. URL: https://doi.org/10.1109/EMRTS.2003.1212740.
  3. Stephen Edwards and Edward A. Lee. The case for the precision timed (pret) machine. Technical Report UCB/EECS-2006-149, EECS Department, University of California, Berkeley, November 2006. URL: http://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-149.html.
  4. Stephen A. Edwards, Sungjun Kim, Edward A. Lee, Isaac Liu, Hiren D. Patel, and Martin Schoeberl. A disruptive computer design idea: Architectures with repeatable timing. In Proceedings of IEEE International Conference on Computer Design (ICCD 2009), Lake Tahoe, CA, October 2009. IEEE. Google Scholar
  5. Kai-Björn Gemlau, Leonie Köhler, Rolf Ernst, and Sophie Quinton. System-level logical execution time: Augmenting the logical execution time paradigm for distributed real-time automotive software. ACM Trans. Cyber-Phys. Syst., 5(2), January 2021. URL: https://doi.org/10.1145/3381847.
  6. T. A. Henzinger, B. Horowitz, and C. M. Kirsch. Giotto: A time-triggered language for embedded programming. In EMSOFT 2001, volume LNCS 2211, pages 166-184. Springer-Verlag, 2001. Google Scholar
  7. Nicolas Hili, Alain Girault, and Eric Jenn. Worst-case reaction time optimization on deterministic multi-core architectures with synchronous languages. In 2019 IEEE 25th International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA), pages 1-11, 2019. URL: https://doi.org/10.1109/RTCSA.2019.8864570.
  8. Erling R. Jellum, Shaokai Lin, Peter Donovan, Chadlia Jerad, Edward Wang, Marten Lohstroh, Edward A. Lee, and Martin Schoeberl. Interpret: A time-predictable multicore processor. In Proceedings of Cyber-Physical Systems and Internet of Things Week 2023, CPS-IoT Week '23, pages 331-336, New York, NY, USA, 2023. Association for Computing Machinery. URL: https://doi.org/10.1145/3576914.3587497.
  9. Erling Rennemo Jellum, Shaokai Lin, Peter Donovan, Efsane Soyer, Fuzail Shakir, Torleiv Bryne, Milica Orlandic, Marten Lohstroh, and Edward A. Lee. Beyond the Threaded Programming Model on Real-Time Operating Systems. In Federico Terraneo and Daniele Cattaneo, editors, Fourth Workshop on Next Generation Real-Time Embedded Systems (NG-RES 2023), volume 108 of Open Access Series in Informatics (OASIcs), pages 3:1-3:13, Dagstuhl, Germany, 2023. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL: https://doi.org/10.4230/OASIcs.NG-RES.2023.3.
  10. Mike Jones. What really happened on Mars Rover Pathfinder. Technical report, Microsoft, 1997. Google Scholar
  11. Ehsan Khodadad, Luca Pezzarossa, and Martin Schoeberl. Towards lingua franca on the patmos processor. In Proceedings of the 2024 IEEE 27th International Symposium on Real-Time Distributed Computing (ISORC), 2024. Google Scholar
  12. Phil Koopman. A case study of toyota unintended acceleration and software safety. Technical report, ECE Department, Carnegie Mellon University, 2014. Google Scholar
  13. Edward Lee, Jan Reineke, and Michael Zimmer. Abstract PRET machines. In 2017 IEEE Real-Time Systems Symposium (RTSS), pages 1-11, 2017. URL: https://doi.org/10.1109/RTSS.2017.00041.
  14. Edward A. Lee. The problem with threads. IEEEC, 39(5):33-42, 2006. URL: https://doi.org/10.1109/MC.2006.180.
  15. Edward A. Lee. Computing needs time. Communications of the ACM, 2009. Google Scholar
  16. Edward A. Lee and Marten Lohstroh. Generalizing Logical Execution Time, pages 160-181. Springer Nature Switzerland, Cham, 2022. URL: https://doi.org/10.1007/978-3-031-22337-2_8.
  17. Isaac Liu. Precision Timed Machines. PhD thesis, EECS Department, University of California, Berkeley, May 2012. URL: http://www2.eecs.berkeley.edu/Pubs/TechRpts/2012/EECS-2012-113.html.
  18. Isaac Liu, Jan Reineke, David Broman, Michael Zimmer, and Edward A. Lee. A PRET microarchitecture implementation with repeatable timing and competitive performance. In Proceedings of the 30th IEEE International Conference on Computer Design (ICCD 2012), October 2012. URL: http://chess.eecs.berkeley.edu/pubs/919.html.
  19. Marten Lohstroh, Christian Menard, Soroush Bateni, and Edward A. Lee. Toward a lingua franca for deterministic concurrent systems. ACM Transactions on Embedded Computing Systems, 2021. Google Scholar
  20. Marten Lohstroh, Martin Schoeberl, Andrés Goens, Armin Wasicek, Christopher Gill, Marjan Sirjani, and Edward A. Lee. Actors revisited for time-critical systems. In Proceedings of the 56th Annual Design Automation Conference 2019, DAC '19, pages 152:1-152:4, New York, NY, USA, June 2019. ACM. URL: https://doi.org/10.1145/3316781.3323469.
  21. Magnus Mæhlum. Programming PRET machines. Software, (visited on 2025-03-17). URL: https://github.com/magnmaeh/programming-pret-machines
    Software Heritage Logo archived version
    full metadata available at: https://doi.org/10.4230/artifacts.23000
  22. Goncalo Martins, Dave Lacey, Allistair Moses, Matthew J. Rutherford, and Kimon P. Valavanis. A case for i/o response benchmarking of microprocessors. In IECON 2012 - 38th Annual Conference on IEEE Industrial Electronics Society, pages 3018-3023, 2012. URL: https://doi.org/10.1109/IECON.2012.6389416.
  23. David May. The XMOS XS1 Architecture, 2009. Google Scholar
  24. Saranya Natarajan and David Broman. Timed c: An extension to the c programming language for real-time systems. In 2018 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 227-239, 2018. URL: https://doi.org/10.1109/RTAS.2018.00031.
  25. Martin Schoeberl. Time-predictable computer architecture. EURASIP Journal on Embedded Systems, vol. 2009, Article ID 758480:17 pages, 2009. URL: https://doi.org/10.1155/2009/758480.
  26. Martin Schoeberl, Sahar Abbaspour, Benny Akesson, Neil Audsley, Raffaele Capasso, Jamie Garside, Kees Goossens, Sven Goossens, Scott Hansen, Reinhold Heckmann, Stefan Hepp, Benedikt Huber, Alexander Jordan, Evangelia Kasapaki, Jens Knoop, Yonghui Li, Daniel Prokesch, Wolfgang Puffitsch, Peter Puschner, André Rocha, Cláudio Silva, Jens Sparsø, and Alessandro Tocchi. T-CREST: Time-predictable multi-core architecture for embedded systems. Journal of Systems Architecture, 61(9):449-471, 2015. URL: https://doi.org/10.1016/j.sysarc.2015.04.002.
  27. Martin Schoeberl, Ehsan Khodadad, Shaokai Lin, Emad Jacob Maroun, Luca Pezzarossa, and Edward A. Lee. Invited Paper: Worst-Case Execution Time Analysis of Lingua Franca Applications. In Thomas Carle, editor, 22nd International Workshop on Worst-Case Execution Time Analysis (WCET 2024), volume 121 of Open Access Series in Informatics (OASIcs), pages 4:1-4:13, Dagstuhl, Germany, 2024. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL: https://doi.org/10.4230/OASIcs.WCET.2024.4.
  28. Martin Schoeberl, Luca Pezzarossa, and Jens Sparsø. S4noc: a minimalistic network-on-chip for real-time multicores. In Proceedings of the 12th International Workshop on Network on Chip Architectures, pages 8:1-8:6. ACM, October 2019. URL: https://doi.org/10.1145/3356045.3360714.
  29. Martin Schoeberl, Wolfgang Puffitsch, Stefan Hepp, Benedikt Huber, and Daniel Prokesch. Patmos: A time-predictable microprocessor. Real-Time Systems, 54(2):389-423, April 2018. URL: https://doi.org/10.1007/s11241-018-9300-4.
  30. Tórur Biskopstø Strøm, Jens Sparsø, and Martin Schoeberl. Hardlock: Real-time multicore locking. Journal of Systems Architecture, 97:467-476, 2019. URL: https://doi.org/10.1016/j.sysarc.2019.02.003.
  31. Douglas Watt. Programming XC on XMOS devices, 2009. Google Scholar
  32. Eugene Yip, Alain Girault, Partha S. Roop, and Morteza Biglari-Abhari. The forec synchronous deterministic parallel programming language for multicores. In 2016 IEEE 10th International Symposium on Embedded Multicore/Many-core Systems-on-Chip (MCSOC), pages 297-304, 2016. URL: https://doi.org/10.1109/MCSoC.2016.13.
  33. Eugene Yip, Alain Girault, Partha S. Roop, and Morteza Biglari-Abhari. Synchronous deterministic parallel programming for multi-cores with ForeC. ACM Transactions on Programming Languages and Systems, 2023. Google Scholar
  34. Michael Zimmer. Predictable Processors for Mixed-Criticality Systems and Precision-Timed I/O. PhD thesis, EECS Department, University of California, Berkeley, August 2015. URL: http://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-181.html.
  35. Michael Zimmer, David Broman, Chris Shaver, and Edward A. Lee. FlexPRET: A processor platform for mixed-criticality systems. 2014 IEEE 19th Real-Time and Embedded Technology and Applications Symposium (RTAS), 2014. URL: https://doi.org/10.1109/RTAS.2014.6925994.
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