Skip to main content

An Instruction Filter for Time-Predictable Code Execution on Standard Processors

  • Conference paper
  • First Online:
Computer Safety, Reliability, and Security. SAFECOMP 2020 Workshops (SAFECOMP 2020)

Abstract

Dependable cyber-physical systems usually have stringent requirements on their response time, since failure to react to changes in the system state in a timely manner might lead to catastrophic consequences. It is therefore necessary to determine reliable bounds on the execution time of tasks. However, timing analysis, whether done statically using a timing model or based on measurements, struggles with the large number of possible execution paths in typical applications. The single-path code generation paradigm makes timing analysis trivial by producing programs with a single execution path. Single-path code uses predicated execution, where individual instructions are enabled or disabled based on predicates, instead of conditional control-flow branches. Most processing architectures support a limited number of predicated instructions, such as for instance a conditional move, but single-path code benefits from fully predicated execution, where every instruction is predicated. However, few architectures support full predication, thus limiting the choice of processing platforms. We present a novel approach that adds support for fully predicated execution to existing processor cores which do not natively provide it. Single-path code is generated by restructuring regular machine code and replacing conditional control-flow branches with special instructions that control the predication of subsequent code. At runtime an instruction filter interprets these predicate-defining instructions, computes and saves predicates and filters regular instructions based on the predicate state, replacing inactive instructions with a substitute that has no effect (e.g. a NOP). We are implementing this single-path filter for the LEON3 and the IBEX processors.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Delvai, M., Huber, W., Puschner, P., Steininger, A.: Processor support for temporal predictability - the spear design example. In: 2003 Proceedings of the 15th Euromicro Conference on Real-Time Systems, pp. 169–176, July 2003

    Google Scholar 

  2. Geyer, C.B., Huber, B., Prokesch, D., Puschner, P.: Time-predictable code execution - instruction-set support for the single-path approach. In: 16th IEEE International Symposium on Object/Component/Service-Oriented Real-Time Distributed Computing (ISORC 2013), pp. 1–8 (2013)

    Google Scholar 

  3. Law, S., Bate, I.: Achieving appropriate test coverage for reliable measurement-based timing analysis. In: 2016 28th Euromicro Conference on Real-Time Systems (ECRTS), pp. 189–199, July 2016. https://doi.org/10.1109/ECRTS.2016.21

  4. Mahlke, S.A., Hank, R.E., McCormick, J.E., August, D.I., Hwu, W.M.W.: A comparison of full and partial predicated execution support for ILP processors. In: Proceedings of the 22nd Annual International Symposium on Computer Architecture, ISCA 1995, pp. 138–150. Association for Computing Machinery, New York (1995). https://doi.org/10.1145/223982.225965

  5. Prokesch, D., Hepp, S., Puschner, P.: A generator for time-predictable code. In: 2015 IEEE 18th International Symposium on Real-Time Distributed Computing, pp. 27–34, April 2015. https://doi.org/10.1109/ISORC.2015.40

  6. Puschner, P.: The single-path approach towards WCET-analysable software. In: IEEE International Conference on Industrial Technology, vol. 2, pp. 699–704 (2003). https://doi.org/10.1109/ICIT.2003.1290740

  7. Puschner, P.: Experiments with WCET-oriented programming and the single-path architecture. In: 10th IEEE International Workshop on Object-Oriented Real-Time Dependable Systems, pp. 205–210 (2005)

    Google Scholar 

  8. Puschner, P.: Transforming Execution-Time Boundable Code into Temporally Predictable Code, pp. 163–172. Springer, Boston (2002). https://doi.org/10.1007/978-0-387-35599-3_17

  9. Puschner, P., Kirner, R., Huber, B., Prokesch, D.: Compiling for time predictability. In: Ortmeier, F., Daniel, P. (eds.) Computer Safety, Reliability, and Security, pp. 382–391. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33675-1_35

    Chapter  Google Scholar 

  10. Santinelli, L., Guet, F., Morio, J.: Revising measurement-based probabilistic timing analysis. In: 2017 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pp. 199–208, April 2017

    Google Scholar 

  11. Schoeberl, M., et al.: T-CREST: time-predictable multi-core architecture for embedded systems. J. Syst. Archit. 61(9), 449–471 (2015). https://doi.org/10.1016/j.sysarc.2015.04.002

    Article  Google Scholar 

  12. Schoeberl, M., Puschner, P., Kirner, R.: A single-path chip-multiprocessor system, vol. 5860, pp. 47–57 (2009). https://doi.org/10.1007/978-3-642-10265-3_5

  13. Wenzel, I., Kirner, R., Rieder, B., Puschner, P.: Measurement-based timing analysis. Commun. Comput. Inf. Sci. 17, 430–444 (2008). https://doi.org/10.1007/978-3-540-88479-8_30

  14. Wilhelm, R., et al.: The worst-case execution-time problem-overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst. 7(3) (2008). https://doi.org/10.1145/1347375.1347389

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Michael Platzer .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Platzer, M., Puschner, P. (2020). An Instruction Filter for Time-Predictable Code Execution on Standard Processors. In: Casimiro, A., Ortmeier, F., Schoitsch, E., Bitsch, F., Ferreira, P. (eds) Computer Safety, Reliability, and Security. SAFECOMP 2020 Workshops. SAFECOMP 2020. Lecture Notes in Computer Science(), vol 12235. Springer, Cham. https://doi.org/10.1007/978-3-030-55583-2_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-55583-2_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-55582-5

  • Online ISBN: 978-3-030-55583-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics