Useful–cache-block analysis with aiT

aiT for LEON2, e200, and e300 can take cache-related preemption costs into account. This is done by the so-called useful–cache-block (UCB) analysis.

A cache block is useful at a given instruction if it is

  1. definitely in the cache when the instruction is executed and
  2. potentially used again at some time after the execution of the instruction.

The number of useful cache blocks, then, is an upper bound for the number of additional cache misses caused by an interrupt at the instruction.

The output of the analysis is the maximum number of useful cache blocks taken over all program points of the analyzed task.

If the maximum penalty to handle a cache miss in CPU cycles is given, the maximum cache-related time penalty of an interrupt/preemption of the task is computed as the product of the number of useful cache blocks and the penalty for handling a single cache miss.

UCB analysis results

UCB analysis results

UCB analysis results for a particular program point

UCB analysis results for a particular basic block

The analysis output appears in aiT’s message window, the textual report file, and the XML report file. Apart from this global maximum, it is also possible to obtain UCB analysis results for a given basic block, which are then accessible via an additional information window in the control-flow graph.

The UCB analysis is also available in TimingProfiler for PowerPC.