Towards Multicore WCET Analysis
Towards Multicore WCET Analysis∗
Simon Wegener
AbsInt Angewandte Informatik GmbH, Saarbrücken, Germany
Abstract
AbsInt is the leading provider of commercial tools for static code-level timing analysis. Its
aiT Worst-Case Execution Time Analyzer computes tight bounds for the WCET of tasks
in embedded real-time systems. However, the results only incorporate the core-local latencies,
i.e. interference delays due to other cores in a multicore system are ignored. This paper presents
some of the work we have done towards multicore WCET analysis. We look into both static and
measurement-based timing analysis for COTS multicore systems.
1998 ACM Subject Classification C.4 Performance of Systems, D.2.4 Software/Program Verification
Keywords and phrases Worst-Case Execution Time (WCET) Analysis for Multicore Processors,
Real-time Systems
Digital Object Identifier 10.4230/OASIcs.WCET.2017.7
1
Introduction
“The problem of determining upper bounds on execution times for single tasks and for quite
complex processor architectures has been solved” [23]. While this statement was true a
decade ago, when safety-critical embedded systems only used singlecore processors, it no
longer holds since the emergence of the multicore processor in the hard real-time context.
The problem for the timing analysis of multicore systems are the interference delays due
to conflicting, simultaneous accesses to shared resources, like for example the main memory
(see Figure 1). On a singlecore system, the latency of a memory access mostly depends
on the accessed memory region (e.g. slow flash memory vs. fast static RAM) and whether
the accessed memory cell has been cached or not. On a multicore system, the latency also
depends on the memory accesses of the other cores, because multiple simultaneous accesses
might lead to a resource conflict, where only one of the accesses can be served directly, and
the other accesses have to wait. These interference delays need to be included in a worst-case
assessment.
As part of our ongoing work towards multicore timing analysis, we looked in the last
few years into methods for multicore timing analysis, strategies to reduce resource conflicts,
and COTS multicore architectures. The paper at hand contains the findings of this survey.
Additionally, we reviewed the AURIX TC27x and its potential for multicore timing analysis.
To the best of our knowledge, such a review of the AURIX TC27x has not been published
yet.
This paper is organized as follows: In Section 2, we describe approaches for multicore
WCET analysis. In Section 3, we present some strategies to reduce the amount of resource
conflicts, which helps to improve the results of a multicore WCET analysis. In Section 4, we
∗
This work was funded within the project ARAMiS II by the German Federal Ministry for Education and
Research with the funding ID 01IS16025B. The responsibility for the content remains with the authors.
© Simon Wegener;
licensed under Creative Commons License CC-BY
17th International Workshop on Worst-Case Execution Time Analysis (WCET 2017).
Editor: Jan Reineke; Article No. 7; pp. 7:1–7:12
Open Access Series in Informatics
Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany
7:2
Towards Multicore WCET Analysis
Task 1
Task 2
Task 1
Task 2
Shared Memory
Shared Memory
Figure 1 Two tasks which access the shared memory. On a singlecore system (left), each access
takes a certain amount of time, but is not delayed due to resource conflicts. On a multicore system
(right), resource conflicts happen due to simultaneous accesses to the shared memory. Consequently,
the overall execution time of each task is increased.
introduce two multicore architectures and give some hints concerning their suitability for
WCET analysis. In Section 5, we list some related work. Finally, in Section 6, we conclude
and present some of the future work.
2
WCET Analysis for Multicore Systems
Any sound WCET analysis targeting multicore systems must take the interference delays
into account that are caused by resource conflicts. Ignoring these delays might result in
underestimation of the real WCET. Assuming full interferences at all times, however, is also
not a solution, but might result in huge overestimation. Therefore, the interferences, and
consequently, the resource conflicts, have to be analysed in order to get precise results. There
a basically two possibilities for such an analysis:
One can perform a joint analysis of all tasks and cores of the system. This way, the
scheduling of the tasks and their allocation to the cores is known to the microarchitectural
analysis. While this type of analysis may produce the most precise results, it is often
disregarded due to the high computational complexity, rendering this approach infeasible.
One can first perform separate WCET analyses for each task on each core, ignoring all
interferences from the outside. Later, in a second step, the costs due to the interferences
are analysed and incorporated into the results from the former analyses. This is the same
scheme that is already applied on singlecore systems to derive the worst-case response
time which incorporates communication delays and task switch/preemption costs into the
WCET bound. Albeit being computationally easier, this approach needs to take extra
care for the many non-timing-compositional features of modern processor architectures.
2.1
Static WCET Analysis
For static WCET analysis, we propose to use the second approach to tackle multicore systems,
i.e. separate singlecore WCET analysis on the code level and an interference analysis on the
system level. For singlecore WCET analysis, AbsInt provides aiT [1]. Supported multicore
architectures are, among others, the Infineon AURIX TC275 and TC277.
To support interference analysis, we currently implement Worst-Case Resource Access
(WCRA) analyses in the aiT framework. Here, the microarchitectural analysis is used to
determine the maximal number of accesses to a shared resource that can occur during a
task’s execution. One example for such a resource is the shared memory. This number can
be used to estimate the influence of a task on the timing of other tasks.
As always, the more predictable a system is, the easier it is to analyse it statically, and
the more precise are the results [6, 8, 24]. This is in particular true for the interference delays.
S. Wegener
7:3
However, since memory accesses are orders of magnitude slower than normal instructions,
one can argue that the pipeline will drain during the processing of memory accesses. Thus,
the interference delays imposed by resource conflicts do not cause timing anomalies and can
be added later to the singlecore WCET bound [19].
Under this assumption (timing compositionality), singlecore WCET bounds and WCRA
bounds can be used to estimate the multicore WCET in a system level analysis. The precise
design of such an analysis depends on the type of delay caused by resource conten (...truncated)